diff options
Diffstat (limited to 'boost/multi_index/detail/archive_constructed.hpp')
-rw-r--r-- | boost/multi_index/detail/archive_constructed.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/boost/multi_index/detail/archive_constructed.hpp b/boost/multi_index/detail/archive_constructed.hpp index c3891bb32a..0a7a26e0d4 100644 --- a/boost/multi_index/detail/archive_constructed.hpp +++ b/boost/multi_index/detail/archive_constructed.hpp @@ -1,4 +1,4 @@ -/* Copyright 2003-2015 Joaquin M Lopez Munoz. +/* Copyright 2003-2016 Joaquin M Lopez Munoz. * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) @@ -64,8 +64,12 @@ struct archive_constructed:private noncopyable (&get())->~T(); } +#include <boost/multi_index/detail/ignore_wstrict_aliasing.hpp> + T& get(){return *reinterpret_cast<T*>(&space);} +#include <boost/multi_index/detail/restore_wstrict_aliasing.hpp> + private: typename aligned_storage<sizeof(T),alignment_of<T>::value>::type space; }; |