comparison DEPENDENCIES/generic/include/boost/preprocessor/tuple/elem.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
6 # * accompanying file LICENSE_1_0.txt or copy at 6 # * accompanying file LICENSE_1_0.txt or copy at
7 # * http://www.boost.org/LICENSE_1_0.txt) 7 # * http://www.boost.org/LICENSE_1_0.txt)
8 # */ 8 # */
9 # 9 #
10 # /* Revised by Paul Mensonides (2002-2011) */ 10 # /* Revised by Paul Mensonides (2002-2011) */
11 # /* Revised by Edward Diener (2011) */ 11 # /* Revised by Edward Diener (2011,2014) */
12 # 12 #
13 # /* See http://www.boost.org for most recent version. */ 13 # /* See http://www.boost.org for most recent version. */
14 # 14 #
15 # ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP 15 # ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP
16 # define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP 16 # define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP
17 # 17 #
18 # include <boost/preprocessor/cat.hpp> 18 # include <boost/preprocessor/cat.hpp>
19 # include <boost/preprocessor/config/config.hpp> 19 # include <boost/preprocessor/config/config.hpp>
20 # include <boost/preprocessor/facilities/expand.hpp>
20 # include <boost/preprocessor/facilities/overload.hpp> 21 # include <boost/preprocessor/facilities/overload.hpp>
21 # include <boost/preprocessor/tuple/rem.hpp> 22 # include <boost/preprocessor/tuple/rem.hpp>
22 # include <boost/preprocessor/variadic/elem.hpp> 23 # include <boost/preprocessor/variadic/elem.hpp>
24 # include <boost/preprocessor/tuple/detail/is_single_return.hpp>
23 # 25 #
24 # if BOOST_PP_VARIADICS 26 # if BOOST_PP_VARIADICS
25 # if BOOST_PP_VARIADICS_MSVC 27 # if BOOST_PP_VARIADICS_MSVC
26 # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) 28 # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__))
27 # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) 29 # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)
28 # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) 30 # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)
31 /*
32 Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty )
33 else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM
34 functionality. See tuple_elem_bug_test.cxx.
35 */
36 # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \
37 BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \
38 /**/
29 # else 39 # else
30 # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) 40 # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__)
41 # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
31 # endif 42 # endif
32 # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
33 # define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple) 43 # define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple)
34 # else 44 # else
35 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() 45 # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
36 # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple)) 46 # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple))
37 # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) 47 # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)