[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug libstdc++/14528] [3.4/3.5 Regression] trouble with auto_ptr
From: |
reichelt at gcc dot gnu dot org |
Subject: |
[Bug libstdc++/14528] [3.4/3.5 Regression] trouble with auto_ptr |
Date: |
12 Mar 2004 09:21:57 -0000 |
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-03-12
09:21 -------
The problem is basically an auto_ptr problem which can be demonstrated
with the following code snippet:
==============================================================================
#include<memory>
typedef const std::auto_ptr<int> A;
void foo(const A&);
A makeA();
void bar()
{
A a; foo(a); // OK
foo(A()); // error
foo(makeA()); // error - the same as in line 45994 of the original example
}
==============================================================================
The problem is, that you need a copy for the temporary (which can be
eliminated, but in theory you need it). With the current implementation
of auto_ptr this is not supplied.
I don't know whether this is correct or a flaw in our auto_ptr
implementation, or even a flaw in the standard. (See PR 14254/3247
for a related issue that came up with stricter checking of the temporary.)
Can a libstdc++ guru provide some insight, please?
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |libstdc++
Summary|[3.4/3.5 Regression] |[3.4/3.5 Regression] trouble
|compiling Boost.Python test |with auto_ptr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14528
- [Bug c++/14528] New: Regression compiling Boost.Python test, rwgk at yahoo dot com, 2004/03/13
- [Bug c++/14528] [3.4/3.5 Regression] compiling Boost.Python test, pinskia at gcc dot gnu dot org, 2004/03/12
- [Bug libstdc++/14528] [3.4/3.5 Regression] trouble with auto_ptr,
reichelt at gcc dot gnu dot org <=
- [Bug c++/14528] [3.4/3.5 Regression] compiling Boost.Python test, giovannibajo at libero dot it, 2004/03/12
- [Bug c++/14528] [3.4/3.5 Regression] compiling Boost.Python test, reichelt at gcc dot gnu dot org, 2004/03/13
- [Bug c++/14528] Regression compiling Boost.Python test, rwgk at yahoo dot com, 2004/03/13
- [Bug c++/14528] [3.4/3.5 Regression] compiling Boost.Python test, bangerth at dealii dot org, 2004/03/13