core.reflect vs c++ reflection

Adam D Ruppe destructionator at gmail.com
Tue Sep 28 12:48:08 UTC 2021


On Tuesday, 28 September 2021 at 12:38:52 UTC, Per Nordlöw wrote:
> Note that `.stringof` works in cases where 
> `__traits(identifier)` doesn't, such as in

That's because a type has no identifier. And this is good anyway 
because there's never a good reason to get a type as a string. It 
is a bug waiting to happen any time someone writes that, so 
making it an error is a good thing.



More information about the Digitalmars-d mailing list