This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++/10064: crash when using valarray's operator=


Brian dot R dot Landy at mortgage dot wellsFargo dot COM writes:

| Sorry, I assumed it should resize since MS's STL (in VC++ 6.0) does resize.
| I take it this is particular to valarray? 

Yes, the behaviour I was describing is particular to valarray<> -- as
opposed to vector<> which does resizing.  Valarray<> should be thought
of as a low level building bloc.  Automatic resizing is too high level
for the purpose of valarray.

| Because I think I remember
| checking vector (in gcc's STL) and it does.   By undefined do you mean that
| the behavior is left up to the implementer, or that MS should not do the
| resize?  Thanks!

By "undefined behaviour", I meant what the C++ standard means.
Anything can happen.  The implementation may accept or reject it, or
the program may reformat your hard drive.

Thanks,

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]