Well that was stupid of me (feature request)
BCS
ao at pathlink.com
Tue Sep 11 06:56:23 PDT 2007
Reply to Bruno,
> BCS wrote:
>
>> I just came across a stupid little mistake I made that probably added
>> a few dozen K to may app.
>>
>> template Foo(T)
>> {
>> int Bar()
>> {
>> struct Baz {int i; char j}
>> Stack!(Baz) newton;
>> }
>> }
>> struct Stack(T)
>> {
>> unittest
>> {
>> writef("%s\n", T.stringof);
>> }
>> }
> That code does compile: it has syntax errors.
>
I never clamed it did compile. In fact the code shown doesn't actually give
you anything at all because none of the template are instanced.
However that has nothing to do with my point. My point is about a subtle
bug in a piece of my code that looks a lot like this.
More information about the Digitalmars-d
mailing list