aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext/pool_allocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/ext/pool_allocator.h')
-rw-r--r--libstdc++-v3/include/ext/pool_allocator.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/libstdc++-v3/include/ext/pool_allocator.h b/libstdc++-v3/include/ext/pool_allocator.h
index f9dcc7fc88d..e2e38a02af5 100644
--- a/libstdc++-v3/include/ext/pool_allocator.h
+++ b/libstdc++-v3/include/ext/pool_allocator.h
@@ -1,6 +1,6 @@
// Allocators -*- C++ -*-
-// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -54,6 +54,7 @@
#include <bits/functexcept.h>
#include <ext/atomicity.h>
#include <ext/concurrence.h>
+#include <bits/stl_move.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@@ -63,7 +64,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/**
* @brief Base class for __pool_alloc.
*
- * @if maint
* Uses various allocators to fulfill underlying requests (and makes as
* few requests as possible when in default high-speed pool mode).
*
@@ -75,8 +75,6 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
* _S_round_up(requested_size). Thus the client has enough size
* information that we can return the object to the proper free list
* without permanently losing part of the object.
- *
- * @endif
*/
class __pool_alloc_base
{
@@ -164,7 +162,14 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
// 402. wrong new expression in [some_] allocator::construct
void
construct(pointer __p, const _Tp& __val)
- { ::new(__p) _Tp(__val); }
+ { ::new((void *)__p) _Tp(__val); }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ template<typename... _Args>
+ void
+ construct(pointer __p, _Args&&... __args)
+ { ::new((void *)__p) _Tp(std::forward<_Args>(__args)...); }
+#endif
void
destroy(pointer __p) { __p->~_Tp(); }