toString() on struct template

Henning Hasemann hhasemann at web.de
Fri Mar 2 00:33:18 PST 2007


On Fri, 02 Mar 2007 12:32:22 +1100
Daniel Keep <daniel.keep.lists at gmail.com> wrote:

> 
> I think the best explanation in that case would be: "I was wrong."  It
> was something of a long-shot, stab in the dark guess...

Hm okay it has nothing to do with templates it seems, I implemented
my speciasization "Point" directly as struct (not as a special template implementation)
and it produces the same error at run time.

The traces always look like this:

#0  0x080521a8 in _D3std6format8doFormatFDFwZvAC8TypeInfoPvZv ()
#1  0x0804f3b9 in _D3std6string6formatFYAa ()
#2  0x0805e498 in _D7indiana8vector2d5Point12my_to_stringMFZAa (this=0xbf92921c) at vector2d.d:170
#3  0xbf92921c in ?? ()
#4  0xbf929238 in ?? ()
#5  0x0804ac9b in _Dmain () at test.d:45
Previous frame inner to this frame (corrupt stack?)

Also I did not manage to reduce this to some presentable code piece, when
I start from ground I dont manage to get this error.
Arr, I hate this kind of problems, feels like C where a fault somewhere
causes misbehaviour somewhere else.

But why is the problem just there?
The rest of the code happily calls methods everywhere and works.
Very strange thing.

Henning

-- 
v4sw7Yhw4ln0pr7Ock2/3ma7uLw5Xm0l6/7DGKi2e6t6ELNSTVXb7AHIMOen5a2Xs5Mr2g5ACPR hackerkey.com



More information about the Digitalmars-d mailing list