-
Notifications
You must be signed in to change notification settings - Fork 103
Description
There are explicit rules for the mangling of the type std::nullptr_t = decltype(nullptr).
There are currently no rules for the mangling of values, e.g. in the mangling of
void foo<std::nullptr_t>() {}
template void foo<std::nullptr_t{}>() {}
GCC mangles this as _Z3fooILDnEEvv, i.e. because std::nullptr_t has only one value, specifying the type is enough to specifiy the value
clang mangles this as _Z3fooILDn0EEvv, i.e. nullptr has a value of zero.
Both of these seem valid, and very different from other types with only one valid value like std::monostate, which gets mangled as XtlSt9monostateEE, i.e. here is an expression that creates a std::monostate from an empty initializer list.
I think there needs to be clarification on how values of type std::nullptr_t should be mangled