Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / container / detail / value_init.hpp
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2005-2013.
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 //
9 // See http://www.boost.org/libs/container for documentation.
10 //
11 //////////////////////////////////////////////////////////////////////////////
12
13 #ifndef BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP
14 #define BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP
15
16 #if defined(_MSC_VER)
17 #  pragma once
18 #endif
19
20 #include <boost/container/detail/config_begin.hpp>
21 #include <boost/container/detail/workaround.hpp>
22
23 namespace boost {
24 namespace container {
25 namespace container_detail {
26
27 template<class T>
28 struct value_init
29 {
30    value_init()
31       : m_t()
32    {}
33
34    operator T &() { return m_t; }
35
36    T m_t;
37 };
38
39 }  //namespace container_detail {
40 }  //namespace container {
41 }  //namespace boost {
42
43 #include <boost/container/detail/config_end.hpp>
44
45 #endif   //#ifndef BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP