]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/local_function/example/impl_pp_keyword.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / local_function / example / impl_pp_keyword.cpp
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 //[impl_pp_keyword
9 #include <boost/local_function/detail/preprocessor/keyword/thisunderscore.hpp>
10 #include <boost/local_function/detail/preprocessor/keyword/const.hpp>
11 #include <boost/local_function/detail/preprocessor/keyword/bind.hpp>
12 #include <boost/detail/lightweight_test.hpp>
13
14 // Expand to 1 if space-separated tokens end with `this_`, 0 otherwise.
15 #define IS_THIS_BACK(tokens) \
16 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_IS_THISUNDERSCORE_BACK( \
17 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_BIND_REMOVE_FRONT( \
18 BOOST_LOCAL_FUNCTION_DETAIL_PP_KEYWORD_CONST_REMOVE_FRONT( \
19 tokens \
20 )))
21
22 int main(void) {
23 BOOST_TEST(IS_THIS_BACK(const bind this_) == 1);
24 BOOST_TEST(IS_THIS_BACK(const bind& x) == 0);
25 return boost::report_errors();
26 }
27 //]
28