]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/vmd/list/to_tuple.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / vmd / list / to_tuple.hpp
1
2 // (C) Copyright Edward Diener 2015
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
6
7 #if !defined(BOOST_VMD_LIST_TO_TUPLE_HPP)
8 #define BOOST_VMD_LIST_TO_TUPLE_HPP
9
10 #include <boost/vmd/detail/setup.hpp>
11
12 #if BOOST_PP_VARIADICS
13
14 #include <boost/preprocessor/control/iif.hpp>
15 #include <boost/preprocessor/list/to_tuple.hpp>
16 #include <boost/vmd/empty.hpp>
17 #include <boost/vmd/is_empty_list.hpp>
18
19 /*
20
21 The succeeding comments in this file are in doxygen format.
22
23 */
24
25 /** \file
26 */
27
28 /** \def BOOST_VMD_LIST_TO_TUPLE(list)
29
30 \brief converts a list to a tuple.
31
32 list = list to be converted.
33
34 If the list is an empty list (BOOST_PP_NIL) it is converted to an empty tuple.
35 Otherwise the list is converted to a tuple with the same number of elements as the list.
36 */
37
38 #define BOOST_VMD_LIST_TO_TUPLE(list) \
39 BOOST_PP_IIF \
40 ( \
41 BOOST_VMD_IS_EMPTY_LIST(list), \
42 BOOST_VMD_EMPTY, \
43 BOOST_PP_LIST_TO_TUPLE \
44 ) \
45 (list) \
46 /**/
47
48 #endif /* BOOST_PP_VARIADICS */
49 #endif /* BOOST_VMD_LIST_TO_TUPLE_HPP */