Templates and stringof...

Era Scarecrow rtcvb32 at yahoo.com
Sat Aug 4 13:09:12 PDT 2012


On Saturday, 4 August 2012 at 11:23:07 UTC, David Nadlinger wrote:
> I'm not sure what you mean with »[…] the only acceptable 
> input is a string; Since strings won't hold the type 
> information...« – the input to BitfieldsOn is _not_ a 
> string, it is an alias. The trick is that you can refer to it 
> as »target« inside the mixin template, so the problem of 
> obtaining the »real name« of something doesn't even arise.

  Honestly i don't understand. In my code i was referring to the 
variable as 'target'; But when came time to return a string it 
needs the full name/location to refer to (as a string) to inject 
the code, which then the 'stringof' didn't help.

  I've already done a workaround that resolves the problem, we can 
refer back to this another time if another solution presents 
itself.


More information about the Digitalmars-d mailing list