aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely.gcc@gmail.com>2011-06-11 16:05:08 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2011-06-11 17:05:08 +0100
commitc51b58dc1f298bc8255758a51e94d5b7478b56ab (patch)
tree447dd60007e928ad8f52ed863e1e46067492b948 /libstdc++-v3/include
parenta9a76bae8bc5f7d9f73acca95a55bd46c873e65b (diff)
downloadgcc-c51b58dc1f298bc8255758a51e94d5b7478b56ab.zip
gcc-c51b58dc1f298bc8255758a51e94d5b7478b56ab.tar.gz
gcc-c51b58dc1f298bc8255758a51e94d5b7478b56ab.tar.bz2
extptr_allocator.h (construct, destroy): Fix for C++0x mode by overloading to take allocator's pointer type.
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. From-SVN: r174958
Diffstat (limited to 'libstdc++-v3/include')
-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 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<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)