diff options
Diffstat (limited to 'boost/local_function/aux_/preprocessor/traits/decl_/validate_/this_count.hpp')
-rw-r--r-- | boost/local_function/aux_/preprocessor/traits/decl_/validate_/this_count.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/boost/local_function/aux_/preprocessor/traits/decl_/validate_/this_count.hpp b/boost/local_function/aux_/preprocessor/traits/decl_/validate_/this_count.hpp new file mode 100644 index 0000000000..034e8e69b4 --- /dev/null +++ b/boost/local_function/aux_/preprocessor/traits/decl_/validate_/this_count.hpp @@ -0,0 +1,38 @@ + +// Copyright (C) 2009-2012 Lorenzo Caminiti +// Distributed under the Boost Software License, Version 1.0 +// (see accompanying file LICENSE_1_0.txt or a copy at +// http://www.boost.org/LICENSE_1_0.txt) +// Home at http://www.boost.org/libs/local_function + +#ifndef BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_HPP_ +#define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT_HPP_ + +#include <boost/local_function/aux_/preprocessor/traits/decl_/set_error.hpp> +#include <boost/local_function/aux_/preprocessor/traits/decl_const_binds.hpp> +#include <boost/local_function/aux_/preprocessor/traits/decl_binds.hpp> +#include <boost/preprocessor/control/iif.hpp> +#include <boost/preprocessor/facilities/empty.hpp> +#include <boost/preprocessor/tuple/eat.hpp> +#include <boost/preprocessor/comparison/greater.hpp> +#include <boost/preprocessor/list/append.hpp> +#include <boost/preprocessor/list/size.hpp> + +// PUBLIC // + +#define BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_VALIDATE_THIS_COUNT( \ + decl_traits) \ + BOOST_PP_IIF(BOOST_PP_GREATER(BOOST_PP_LIST_SIZE(BOOST_PP_LIST_APPEND( \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_CONST_BIND_THIS_TYPES( \ + decl_traits), \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_BIND_THIS_TYPES( \ + decl_traits))), \ + 1), \ + BOOST_LOCAL_FUNCTION_AUX_PP_DECL_TRAITS_SET_ERROR \ + , /* do nothing (keeping previous error, if any) */ \ + decl_traits BOOST_PP_TUPLE_EAT(2) \ + )(decl_traits, /* trailing `EMPTY` because error might not be present */ \ + ERROR_cannot_bind_object_this_multiple_times BOOST_PP_EMPTY) + +#endif // #include guard + |