aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2011-06-11 16:05:08 +0000
committerJonathan Wakely <jwakely.gcc@gmail.com>2011-06-11 16:05:08 +0000
commitb287bfee22f2db47f844209cfca497881d6d6761 (patch)
tree447dd60007e928ad8f52ed863e1e46067492b948 /libstdc++-v3/include/ext
parent2a787eed54d9c16d7f161a106a0ee0b5c7203a85 (diff)
2011-06-11 Jonathan Wakely <jwakely.gcc@gmail.com>
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174958 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext')
-rw-r--r--libstdc++-v3/include/ext/extptr_allocator.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/include/ext/extptr_allocator.h b/libstdc++-v3/include/ext/extptr_allocator.h
index 96aea72cc88..21b1282dbc1 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<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { construct(__p.get(), std::forward<_Args>(__args)...); }
+
template<typename _Up>
void
destroy(_Up* __p)
{ __p->~_Up(); }
+
+ void destroy(pointer __p)
+ { destroy(__p.get()); }
+
#else
void construct(pointer __p, const _Tp& __val)