Skip to content

Commit

Permalink
fix(gcc): mangled name
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Jul 12, 2024
1 parent b6ae810 commit ee52e06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/rebind/name.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ namespace rebind
static constexpr std::string_view enum_prefix = "enum ";

template <auto T>
consteval std::string_view mangled_name()
consteval auto mangled_name()
{
return std::source_location::current().function_name();
}

template <typename T>
consteval auto type_name()
{
constexpr auto mangled = mangled_name<std::type_identity<T>{}>();
constexpr std::string_view mangled = mangled_name<std::type_identity<T>{}>();

constexpr auto start = mangled.substr(mangled.find(type_start) + type_start.size());
constexpr auto end = start.substr(0, start.rfind(type_end));
Expand All @@ -53,7 +53,7 @@ namespace rebind
template <auto T>
consteval auto nttp_name()
{
constexpr auto mangled = mangled_name<T>();
constexpr std::string_view mangled = mangled_name<T>();

constexpr auto start = mangled.substr(mangled.find(nttp_start) + nttp_start.size());
constexpr auto end = start.substr(0, start.rfind(nttp_end));
Expand Down

0 comments on commit ee52e06

Please sign in to comment.