]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/beast/core/detail/in_place_init.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / beast / core / detail / in_place_init.hpp
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9
10 #ifndef BOOST_BEAST_DETAIL_IN_PLACE_INIT_HPP
11 #define BOOST_BEAST_DETAIL_IN_PLACE_INIT_HPP
12
13 #include <boost/version.hpp>
14 #include <boost/optional/optional.hpp>
15
16 // Provide boost::in_place_init_t and boost::in_place_init
17 // for Boost versions earlier than 1.63.0.
18
19 #if BOOST_VERSION < 106300
20
21 namespace boost {
22
23 namespace optional_ns {
24
25 // a tag for in-place initialization of contained value
26 struct in_place_init_t
27 {
28 struct init_tag{};
29 explicit in_place_init_t(init_tag){}
30 };
31 const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
32
33 } // namespace optional_ns
34
35 using optional_ns::in_place_init_t;
36 using optional_ns::in_place_init;
37
38 }
39
40 #endif
41
42 #endif
43