Re: libstdc++/3551: error in auto_ptr implementation

2001-07-03 Thread Gabriel Dos Reis
Matthias Klose <[EMAIL PROTECTED]> writes: | The code below does not compile with g++ 3.0, but it seems correct | judging by my C++ books. No serious up-to-date C++ book can claim the code below should work. | list > lapi; That is incorrect: You cannot put an auto_ptr<> in a standard contain

Re: libstdc++/3551: error in auto_ptr implementation

2001-07-03 Thread Ross Smith
Matthias Klose wrote: > > The code below does not compile with g++ 3.0, but it seems correct > judging by my C++ books. > > Wichert. > > #include > #include > using namespace std; > int main(int, char**) { > auto_ptr api(new int(5)); > list > lapi; > lapi.push_back(api); > return 0; >