xieite::name()

Defined in fragment xieite:name
(header-only: <xieite/meta/name.hpp>)


Returns the name of a type or value as a string by parsing __PRETTY_FUNCTION__ or __FUNCSIG__. Does not perform any additional string processing, so the output is entirely compiler-dependent.


Declaration

#0
template<typename>
[[nodiscard]] consteval std::string_view name() noexcept;
Returns the name of a type.

#1
template<auto>
[[nodiscard]] consteval std::string_view name() noexcept;
Returns the name of a value.


Example

import std;
import xieite;

int main() {
	xieite::dump(xieite::name<std::vector<int>>());
}
Possible output:
std::vector<int>