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]

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


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