1 2 // Copyright (C) 2009-2012 Lorenzo Caminiti 3 // Distributed under the Boost Software License, Version 1.0 4 // (see accompanying file LICENSE_1_0.txt or a copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 // Home at http://www.boost.org/libs/local_function 7 8 #ifndef BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_HPP_ 9 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_HPP_ 10 11 #include <boost/local_function/detail/preprocessor/keyword/facility/is.hpp> 12 #include <boost/local_function/detail/preprocessor/keyword/facility/add.hpp> 13 #include <boost/local_function/detail/preprocessor/keyword/facility/remove.hpp> 14 15 // PRIVATE // 16 17 // These are not local macros -- DO NOT #UNDEF. 18 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_IS_const (1) /* unary */ 19 #define const_BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_IS (1) /* unary */ 20 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE_const /* nothing */ 21 #define const_BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE /* nothing */ 22 23 // PUBLIC // 24 25 // Is. 26 27 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_CONST_FRONT(tokens) \ 28 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_FACILITY_IS_FRONT(tokens, \ 29 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_IS_) 30 31 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_CONST_BACK(token) \ 32 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_FACILITY_IS_BACK(token, \ 33 _BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_IS) 34 35 // Remove. 36 37 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE_FRONT(tokens) \ 38 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_FACILITY_REMOVE_FRONT(tokens, \ 39 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_CONST_FRONT, \ 40 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE_) 41 42 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE_BACK(tokens) \ 43 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_FACILITY_REMOVE_BACK(tokens, \ 44 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_CONST_BACK, \ 45 _BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE) 46 47 // Add. 48 49 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_ADD_FRONT(tokens) \ 50 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_FACILITY_ADD_FRONT(tokens, \ 51 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_CONST_FRONT, const) 52 53 #define BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_ADD_BACK(tokens) \ 54 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_FACILITY_ADD_BACK(tokens, \ 55 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_CONST_BACK, const) 56 57 #endif // #include guard 58 59