Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:43:28

0001 // Copyright Daniel Wallin 2006.
0002 // Copyright Cromwell D. Enage 2017.
0003 // Distributed under the Boost Software License, Version 1.0.
0004 // (See accompanying file LICENSE_1_0.txt or copy at
0005 // http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_QUALIFIER_HPP
0008 #define BOOST_PARAMETER_AUX_PREPROCESSOR_QUALIFIER_HPP
0009 
0010 #define BOOST_PARAMETER_QUALIFIER_EAT_in(x)
0011 #define BOOST_PARAMETER_QUALIFIER_EAT_out(x)
0012 #define BOOST_PARAMETER_QUALIFIER_EAT_in_out(x)
0013 #define BOOST_PARAMETER_QUALIFIER_EAT_consume(x)
0014 #define BOOST_PARAMETER_QUALIFIER_EAT_move_from(x)
0015 #define BOOST_PARAMETER_QUALIFIER_EAT_forward(x)
0016 
0017 #define BOOST_PARAMETER_GET_QUALIFIER_in(x) in_reference
0018 #define BOOST_PARAMETER_GET_QUALIFIER_out(x) out_reference
0019 #define BOOST_PARAMETER_GET_QUALIFIER_in_out(x) in_out_reference
0020 #define BOOST_PARAMETER_GET_QUALIFIER_consume(x) consume_reference
0021 #define BOOST_PARAMETER_GET_QUALIFIER_move_from(x) move_from_reference
0022 #define BOOST_PARAMETER_GET_QUALIFIER_forward(x) forward_reference
0023 
0024 #define BOOST_PARAMETER_STRIP_QUALIFIER_in(x) x
0025 #define BOOST_PARAMETER_STRIP_QUALIFIER_out(x) x
0026 #define BOOST_PARAMETER_STRIP_QUALIFIER_in_out(x) x
0027 #define BOOST_PARAMETER_STRIP_QUALIFIER_consume(x) x
0028 #define BOOST_PARAMETER_STRIP_QUALIFIER_move_from(x) x
0029 #define BOOST_PARAMETER_STRIP_QUALIFIER_forward(x) x
0030 
0031 #include <boost/preprocessor/cat.hpp>
0032 
0033 #define BOOST_PARAMETER_GET_QUALIFIER_GET(x) \
0034     BOOST_PP_CAT(BOOST_PARAMETER_GET_QUALIFIER_, x)
0035 /**/
0036 
0037 #define BOOST_PARAMETER_GET_UNQUALIFIED(x) \
0038     BOOST_PP_CAT(BOOST_PARAMETER_STRIP_QUALIFIER_, x)
0039 /**/
0040 
0041 #include <boost/preprocessor/facilities/is_empty.hpp>
0042 
0043 // Expands to 1 if x is either "in(k)", "out(k)", "in_out(k)", "consume(k)",
0044 // "move_from(k)", or "forward(k)"; expands to 0 otherwise.
0045 #define BOOST_PARAMETER_IS_QUALIFIER(x) \
0046     BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PARAMETER_QUALIFIER_EAT_, x))
0047 /**/
0048 
0049 #include <boost/preprocessor/control/iif.hpp>
0050 
0051 // Expands to the qualifier of x,
0052 // where x is either a keyword qualifier or a keyword.
0053 //
0054 //   k => forward_reference
0055 //   in(k) => in_reference
0056 //   out(k) => out_reference
0057 //   in_out(k) => in_out_reference
0058 //   forward(k) => forward_reference
0059 //   consume(k) => consume_reference
0060 //   move_from(k) => move_from_reference
0061 #define BOOST_PARAMETER_GET_QUALIFIER(x) \
0062     BOOST_PP_IIF( \
0063         BOOST_PARAMETER_IS_QUALIFIER(x) \
0064       , BOOST_PARAMETER_GET_QUALIFIER_GET(x) \
0065       , forward_reference \
0066     )
0067 /**/
0068 
0069 // Expands to the unqualified version of x,
0070 // where x is either a keyword qualifier or a keyword.
0071 //
0072 //   k => k
0073 //   in(k) => k
0074 //   out(k) => k
0075 //   in_out(k) => k
0076 //   forward(k) => k
0077 //   consume(k) => k
0078 //   move_from(k) => k
0079 #define BOOST_PARAMETER_UNQUALIFIED(x) \
0080     BOOST_PP_IIF( \
0081         BOOST_PARAMETER_IS_QUALIFIER(x) \
0082       , BOOST_PARAMETER_GET_UNQUALIFIED(x) \
0083       , x \
0084     )
0085 /**/
0086 
0087 #endif  // include guard
0088