[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Toon-members] Re: STL containers with TooN

From: E. Rosten
Subject: Re: [Toon-members] Re: STL containers with TooN
Date: Mon, 11 Jan 2010 15:09:01 +0000 (GMT)
User-agent: Alpine 2.00 (LSU 1167 2008-08-23)

On Mon, 11 Jan 2010, Gabriel Nützi wrote:

Sorry, I was stupid!


Actually, this is a problem in TooN. Vector<Dynamic> and Vector<Resizable> are copy constructible, but operator= will only work if the vectors are already the same size. Vector<Dyanmic> is not default constructible, but Vector<Resizable> is.

I don't know what the precise requirements of the STL are. I think making Vector<Resizable> resize automatically on a call to operator= will make it completely safe to store in all STL containers.

Thoughts, anyone?



Am 10.01.2010 um 21:37 schrieb Gabriel Nützi:

Hello again

Sorry for my questions, but I am using TooN permanently, with all its advantages... (LU,SymEigen....)

I was wondering, because I need a container which is as fallowing

list < Vector<Dynamic,double> >   myList;

Why does it give RunTime problems and segmentation errors when I try to use the list by inserting and deleting Vectors, it happens also when the Vector is not dynamic ...

Is there any troubles with the containers and TooN?

This crashed in Runtime:

list < Vector<Dynamic,double> >   myList;
myList.push_back( makeVector (1,1,1) );
myList.push_back( makeVector (2,1,1) );
myList.push_back( makeVector (3,1,1) );

list < Vector<Dynamic,double> > ::iterator it;

it = myList.begin();



Thanks a lot


Toon-members mailing list

(You can't go wrong with psycho-rats.)(

/d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
    d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage

reply via email to

[Prev in Thread] Current Thread [Next in Thread]