Templates and stringof...

Era Scarecrow rtcvb32 at yahoo.com
Fri Aug 3 15:23:21 PDT 2012


On Friday, 3 August 2012 at 22:18:25 UTC, Andrej Mitrovic wrote:
> On 8/4/12, Andrej Mitrovic <andrej.mitrovich at gmail.com> wrote:
>> On 8/3/12, Era Scarecrow <rtcvb32 at yahoo.com> wrote:
>>>   Now, how do I get the template's stringof to print out 
>>> 'i_num.i'
>>> and not 'i'?
>>  snip
>
> Ahh crap, it doesn't return the *instance* name. Sorry!! Maybe 
> there can be a fix though, I'll give it a try..

Mmmm worse comes to worse i can do a mixin, which generates the 
text into it's non-text verision and passes both to my template 
which then does it's appropriate checks.

  Seems like an ugly hack though (to get this done). Why not have 
another method of fullpathStringof or something similar? Then 
again if this is one of the few cases that could benefit from it, 
then maybe we should make it ugly so no one else will use it.


More information about the Digitalmars-d-learn mailing list