Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/local_function/aux_/preprocessor/traits/param.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 
0002 // Copyright (C) 2009-2012 Lorenzo Caminiti
0003 // Distributed under the Boost Software License, Version 1.0
0004 // (see accompanying file LICENSE_1_0.txt or a copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 // Home at http://www.boost.org/libs/local_function
0007 
0008 #ifndef BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_HPP_
0009 #define BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_HPP_
0010 
0011 #include <boost/preprocessor/tuple/elem.hpp>
0012 
0013 // PRIVATE //
0014 
0015 // Param 2-tuple `([auto | register] type name, default_value)`.
0016 #define BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_DECL_    0
0017 #define BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_DEFAULT_ 1
0018 #define BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_MAX_     2
0019 
0020 // PUBLIC //
0021 
0022 // Expand: `[auto | register] type_ name_` (parameter declaration).
0023 #define BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_DECL(param_traits) \
0024     BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_MAX_, \
0025             BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_DECL_, param_traits)
0026 
0027 // Expand: `default ... EMPTY()` if default value, `EMPTY()` otherwise.
0028 // Leading default is kept because default value might not be alphanumeric
0029 // (e.g., -123) so failing `CAT` for `IS_EMPTY` check.
0030 #define BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_DEFAULT(param_traits) \
0031     BOOST_PP_TUPLE_ELEM(BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_MAX_, \
0032             BOOST_LOCAL_FUNCTION_AUX_PP_PARAM_TRAITS_INDEX_DEFAULT_, \
0033             param_traits)(/* expand EMPTY */)
0034 
0035 #endif // #include guard
0036