]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/local_function/include/boost/local_function/aux_/preprocessor/traits/decl_/validate_/this_count.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / local_function / include / boost / local_function / aux_ / preprocessor / traits / decl_ / validate_ / this_count.hpp
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_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_HPP_
9 #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_HPP_
10
11 #include <boost/local_function/aux_/preprocessor/traits/decl_/set_error.hpp>
12 #include <boost/local_function/aux_/preprocessor/traits/decl_const_binds.hpp>
13 #include <boost/local_function/aux_/preprocessor/traits/decl_binds.hpp>
14 #include <boost/preprocessor/control/iif.hpp>
15 #include <boost/preprocessor/facilities/empty.hpp>
16 #include <boost/preprocessor/tuple/eat.hpp>
17 #include <boost/preprocessor/comparison/greater.hpp>
18 #include <boost/preprocessor/list/append.hpp>
19 #include <boost/preprocessor/list/size.hpp>
20
21 // PUBLIC //
22
23 #define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT( \
24 decl_traits) \
25 BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_LIST_SIZE(BOOST_PP_LIST_APPEND( \
26 BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \
27 decl_traits), \
28 BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \
29 decl_traits))), \
30 1), \
31 BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_SET_ERROR \
32 , /* do nothing (keeping previous error, if any) */ \
33 decl_traits BOOST_PP_TUPLE_EAT(2) \
34 )(decl_traits, /* trailing `EMPTY` because error might not be present */ \
35 ERROR_cannot_bind_object_this_multiple_times BOOST_PP_EMPTY)
36
37 #endif // #include guard
38