Well that was stupid of me (feature request)

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue Sep 11 07:59:08 PDT 2007


BCS wrote:
> 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.
> 
> 

I know it actually has not to do with your point, but you asked for 
people to look at your code, and see if they could see the mistake. But 
with a syntax error it would be hard to find the intended mistake 
without actually reading the part where you say what it is. That's all 
I'm saying :)


-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list