Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81231 - trunk/boost/smart_ptr/detail
From: glenfe_at_[hidden]
Date: 2012-11-07 10:04:05


Author: glenfe
Date: 2012-11-07 10:04:04 EST (Wed, 07 Nov 2012)
New Revision: 81231
URL: http://svn.boost.org/trac/boost/changeset/81231

Log:
Update smart_ptr/detail/array_helper to have create and create_noinit for non-array case.
Text files modified:
   trunk/boost/smart_ptr/detail/array_helper.hpp | 8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)

Modified: trunk/boost/smart_ptr/detail/array_helper.hpp
==============================================================================
--- trunk/boost/smart_ptr/detail/array_helper.hpp (original)
+++ trunk/boost/smart_ptr/detail/array_helper.hpp 2012-11-07 10:04:04 EST (Wed, 07 Nov 2012)
@@ -13,6 +13,14 @@
     namespace detail {
         template<typename T>
         struct array_helper {
+ static void create(T& value) {
+ void* p1 = &value;
+ ::new(p1) T();
+ }
+ static void create_noinit(T& value) {
+ void* p1 = &value;
+ ::new(p1) T;
+ }
             static void destroy(T& value) {
                 value.~T();
             }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk