]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/local_function/example/impl_pp_keyword.cpp
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
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>
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( \
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();