This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/24805] New: No non-member swap for shared_ptr


Title say it all really, there appears to be no non-member swap for shared_ptr.

TR.2.2.1 has:

// [2.2.3.8] shared_ptr specialized algorithms
template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);

But code like:

#include <tr1/memory>

using std::tr1::swap;

doesn't compile:

/home/john/boost/libs/tr1/test/test_shared_ptr.cpp: In function `int main()':
/home/john/boost/libs/tr1/test/test_shared_ptr.cpp:94: error: `swap' is not a
member of `std::tr1'
/home/john/boost/libs/tr1/test/test_shared_ptr.cpp:95: error: `swap' was not
declared in this scope

Regards, John Maddock.


-- 
           Summary: No non-member swap for shared_ptr
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: john at johnmaddock dot co dot uk
 GCC build triplet: linux.x86
  GCC host triplet: linux.x86
GCC target triplet: linux.x86


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24805


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