From c51b58dc1f298bc8255758a51e94d5b7478b56ab Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Sat, 11 Jun 2011 16:05:08 +0000 Subject: extptr_allocator.h (construct, destroy): Fix for C++0x mode by overloading to take allocator's pointer type. 2011-06-11 Jonathan Wakely * include/ext/extptr_allocator.h (construct, destroy): Fix for C++0x mode by overloading to take allocator's pointer type. * testsuite/23_containers/vector/ext_pointer/types/2.cc: New. * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/ 2.cc: New. From-SVN: r174958 --- libstdc++-v3/include/ext/extptr_allocator.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libstdc++-v3/include') diff --git a/libstdc++-v3/include/ext/extptr_allocator.h b/libstdc++-v3/include/ext/extptr_allocator.h index 96aea72..21b1282 100644 --- a/libstdc++-v3/include/ext/extptr_allocator.h +++ b/libstdc++-v3/include/ext/extptr_allocator.h @@ -107,10 +107,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION construct(_Up* __p, _Args&&... __args) { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); } + template + void + construct(pointer __p, _Args&&... __args) + { construct(__p.get(), std::forward<_Args>(__args)...); } + template void destroy(_Up* __p) { __p->~_Up(); } + + void destroy(pointer __p) + { destroy(__p.get()); } + #else void construct(pointer __p, const _Tp& __val) -- cgit v1.1