You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This implementation uses the keyword __unique_stable_name as an operator
that can take a type or expression, and will result in a constexpr
constant character array that (hopefully) uniquely represents the type
or type-of-expression being passed to it.
The unique representation is the normal mangled name of the type, except
in the cases of a lambda, where the ordinal "number" is just replaced
with LINE->COL. Macro expansions are also appended with '~' followed by
the LINE->COL that it appears in.
For example, a lambda declared in
'main' would look like _ZTSZ4mainEUlvE25->12 (line 25, column 12).
A Lambda that comes from a macro looks like:
_ZTSZ4mainEUlvE45->3~18->32 (macro invoked on 45/3, lambda defined
inside the macro on line 18, column 32).
Template instantiations based on the lambda would result in a name that
contains the lambda mangling, for example:
_ZTSZ3bazIZ4mainEUlvE25->12EvvEUlvE14->12
A function template named 'baz' that is instantiated with a lambda
declared in 'main' on line 25/col 12 has another macro in it, declared
on line 14, column 12.
Signed-off-by: Erich Keane <[email protected]>
0 commit comments