Issues with namespaces and template arguments.
SGSSGene opened this issue · 3 comments
SGSSGene commented
If the argument of a template argument is inside an namespace, the type_name()
functionality doesn't return a useful name:
template <typename T> struct A {};
namespace n {
struct B {};
}
static_assert("B>"sv == reflect::type_name<A<n::B>>()); // unexpectedly passes
or see:
krzysztof-jusiak commented
Yeah, it's because of find_last_of("::") :/ fixing...
krzysztof-jusiak commented
So I pushed the fix for type_name - 57af509. That will now returns A
for the case above as the type name by default is the unqualified type_name. I'm planning to add qualified_type_name as a follow-up which will also return fully qualified namespaces.
krzysztof-jusiak commented
Closing as the issue is fixed and a new feature will be added as a follow-up.