is_begin_parens.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # /* **************************************************************************
  2. # * *
  3. # * (C) Copyright Edward Diener 2014.
  4. # * Distributed under the Boost Software License, Version 1.0. (See
  5. # * accompanying file LICENSE_1_0.txt or copy at
  6. # * http://www.boost.org/LICENSE_1_0.txt)
  7. # * *
  8. # ************************************************************************** */
  9. #
  10. # /* See http://www.boost.org for most recent version. */
  11. #
  12. #ifndef BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
  13. #define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
  14. #if BOOST_PP_VARIADICS_MSVC
  15. #include <boost/preprocessor/facilities/empty.hpp>
  16. #define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b)
  17. #define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b)
  18. #define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res
  19. #define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
  20. BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \
  21. /**/
  22. #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1
  23. #else
  24. #define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
  25. BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \
  26. /**/
  27. #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1
  28. #endif /* BOOST_PP_VARIADICS_MSVC */
  29. #define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a
  30. #define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__
  31. #define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__)
  32. #define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
  33. #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1,
  34. #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0,
  35. #endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */