• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #ifndef BOOST_CONTRACT_DETAIL_PP_KEYWORD_PROTECTED_HPP_
3 #define BOOST_CONTRACT_DETAIL_PP_KEYWORD_PROTECTED_HPP_
4 
5 // Copyright (C) 2008-2018 Lorenzo Caminiti
6 // Distributed under the Boost Software License, Version 1.0 (see accompanying
7 // file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
8 // See: http://www.boost.org/doc/libs/release/libs/contract/doc/html/index.html
9 
10 #include <boost/contract/detail/preprocessor/keyword/utility/is.hpp>
11 #include <boost/preprocessor/cat.hpp>
12 
13 /* PRIVATE */
14 
15 // Must expand to a single comma `,` (not local macros, do not #undefine).
16 #define BOOST_CONTRACT_DETAIL_PP_KEYWORD_PROTECTED_CAT_TO_COMMAprotected ,
17 
18 // Must expand to empty `` (not local macros, do not #undefine).
19 #define BOOST_CONTRACT_DETAIL_PP_KEYWORD_PROTECTED_CAT_TO_EMPTYprotected
20 
21 /* PUBLIC */
22 
23 // Precondition: tokens must start with a token concatenable to a macro name
24 //               (e.g., a literal or integral token).
25 #define BOOST_CONTRACT_DETAIL_PP_KEYWORD_IS_PROTECTED(tokens) \
26     BOOST_CONTRACT_DETAIL_PP_KEYWORD_UTILITY_IS( \
27             BOOST_CONTRACT_DETAIL_PP_KEYWORD_PROTECTED_CAT_TO_COMMA, tokens)
28 
29 // Precondition: tokens must start with `protected` (this can be
30 //               checked with `..._IS_PROTECTED` macro above).
31 #define BOOST_CONTRACT_DETAIL_PP_KEYWORD_REMOVE_PROTECTED(tokens) \
32     BOOST_PP_CAT(BOOST_CONTRACT_DETAIL_PP_KEYWORD_PROTECTED_CAT_TO_EMPTY, \
33             tokens)
34 
35 #endif // #include guard
36 
37