]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/tuple/make_tuple.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / tuple / make_tuple.hpp
1 /*=============================================================================
2 Copyright (c) 2014 Kohei Takahashi
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 #ifndef FUSION_MAKE_TUPLE_14122014_0048
8 #define FUSION_MAKE_TUPLE_14122014_0048
9
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/tuple/tuple_fwd.hpp>
12
13 ///////////////////////////////////////////////////////////////////////////////
14 // With no variadics, we will use the C++03 version
15 ///////////////////////////////////////////////////////////////////////////////
16 #if !defined(BOOST_FUSION_HAS_VARIADIC_TUPLE)
17 # include <boost/fusion/tuple/detail/make_tuple.hpp>
18 #else
19
20 ///////////////////////////////////////////////////////////////////////////////
21 // C++11 interface
22 ///////////////////////////////////////////////////////////////////////////////
23 #include <boost/fusion/support/detail/as_fusion_element.hpp>
24 #include <boost/fusion/tuple/tuple.hpp>
25 #include <boost/type_traits/remove_reference.hpp>
26 #include <boost/type_traits/remove_const.hpp>
27
28 namespace boost { namespace fusion
29 {
30 template <typename ...T>
31 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
32 inline tuple<typename detail::as_fusion_element<
33 typename remove_const<
34 typename remove_reference<T>::type
35 >::type
36 >::type...>
37 make_tuple(T&&... arg)
38 {
39 typedef tuple<typename detail::as_fusion_element<
40 typename remove_const<
41 typename remove_reference<T>::type
42 >::type
43 >::type...> result_type;
44 return result_type(std::forward<T>(arg)...);
45 }
46 }}
47
48 #endif
49 #endif
50