This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
libstdc++ of g++ 3.4.x: std::swap and std::auto_ptr causes compilationerrors
- From: Vinzenz Feenstra <evilissimo at web dot de>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 15 Nov 2004 23:23:52 +0100
- Subject: libstdc++ of g++ 3.4.x: std::swap and std::auto_ptr causes compilationerrors
Hi,
I want to point to something which is imho a Bug.
if I try to swap a std::auto_ptr with std::swap it causes a compilation
error because
__glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
do not correctly recongnizes that std::auto_ptr is really assignable.
In my opinion, either a second std::swap template function like that:
namespace std
{
template<class T>
void swap(std::auto_ptr<T>& lhs, std::auto_ptr<T>& rhs)
{
std::auto_ptr<T> tmp = lhs;
lhs = rhs;
rhs = tmp;
}
}
or __glibcxx_function_requires(_SGIAssignableConcept<_Tp>)
should be removed or modified in that way, that it won't raise an error
while compiling.
BR
Vinzenz Feenstra