#include <string_view>
Go to the source code of this file.
|
template<typename T > |
constexpr auto | type_name () noexcept |
|
template<auto E> |
constexpr auto | enum_name () noexcept |
|
template<auto E>
constexpr auto enum_name |
( |
| ) |
|
|
noexcept |
Definition at line 32 of file type_name_to_string.h.
References setup::name, and spatial_type::suffix().
33 static_assert(std::is_enum_v<decltype(E)>);
34 std::string_view
name =
"Error: unsupported compiler", prefix,
suffix;
36 name = __PRETTY_FUNCTION__;
37 prefix =
"auto enum_name() [E = ";
39 #elif defined(__GNUC__)
40 name = __PRETTY_FUNCTION__;
41 prefix =
"constexpr auto enum_name() [with auto E = ";
43 #elif defined(_MSC_VER)
45 prefix =
"auto __cdecl enum_name<";
46 suffix =
">(void) noexcept";
48 name.remove_prefix(prefix.size());
49 name.remove_suffix(suffix.size());
50 if (
const auto pos = name.find_last_of(
":)"); pos != std::string_view::npos) {
51 name.remove_prefix(pos + 1);
std::string suffix(SQLTypes type)
template<typename T >
constexpr auto type_name |
( |
| ) |
|
|
noexcept |
Definition at line 11 of file type_name_to_string.h.
References setup::name, and spatial_type::suffix().
Referenced by CodeGenerator::codegenCastBetweenIntTypesOverflowChecks().
12 std::string_view
name =
"Error: unsupported compiler", prefix,
suffix;
14 name = __PRETTY_FUNCTION__;
15 prefix =
"auto type_name() [T = ";
17 #elif defined(__GNUC__)
18 name = __PRETTY_FUNCTION__;
19 prefix =
"constexpr auto type_name() [with T = ";
21 #elif defined(_MSC_VER)
23 prefix =
"auto __cdecl type_name<";
24 suffix =
">(void) noexcept";
26 name.remove_prefix(prefix.size());
27 name.remove_suffix(suffix.size());
std::string suffix(SQLTypes type)