OSDN Git Service

2011-06-22 Jonathan Wakely <jwakely.gcc@gmail.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / bits / stl_construct.h
index 2efba93..c9090e5 100644 (file)
@@ -60,6 +60,7 @@
 
 #include <new>
 #include <bits/move.h>
+#include <ext/alloc_traits.h>
 
 namespace std _GLIBCXX_VISIBILITY(default)
 {
@@ -141,8 +142,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     _Destroy(_ForwardIterator __first, _ForwardIterator __last,
             _Allocator& __alloc)
     {
+      typedef __gnu_cxx::__alloc_traits<_Allocator> __traits;
       for (; __first != __last; ++__first)
-       __alloc.destroy(std::__addressof(*__first));
+       __traits::destroy(__alloc, std::__addressof(*__first));
     }
 
   template<typename _ForwardIterator, typename _Tp>