is_binary.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright Daniel Wallin 2006.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_PARAMETER_AUX_PREPROCESSOR_IS_BINARY_HPP
  6. #define BOOST_PARAMETER_AUX_PREPROCESSOR_IS_BINARY_HPP
  7. #include <boost/config.hpp>
  8. #include <boost/config/workaround.hpp>
  9. #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
  10. // From Paul Mensonides
  11. #include <boost/preprocessor/punctuation/comma.hpp>
  12. #include <boost/preprocessor/detail/split.hpp>
  13. #define BOOST_PARAMETER_IS_BINARY(x) \
  14. BOOST_PP_SPLIT(1, BOOST_PARAMETER_IS_BINARY_C x BOOST_PP_COMMA() 0)
  15. /**/
  16. #include <boost/preprocessor/punctuation/paren.hpp>
  17. #include <boost/preprocessor/tuple/eat.hpp>
  18. #define BOOST_PARAMETER_IS_BINARY_C(x,y) \
  19. ~, 1 BOOST_PP_RPAREN() \
  20. BOOST_PP_TUPLE_EAT(2) BOOST_PP_LPAREN() ~
  21. /**/
  22. #else
  23. #include <boost/preprocessor/detail/is_binary.hpp>
  24. #define BOOST_PARAMETER_IS_BINARY(x) BOOST_PP_IS_BINARY(x)
  25. #endif
  26. #endif // include guard