is_number.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // (C) Copyright Edward Diener 2011-2015
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. #if !defined(BOOST_VMD_IS_NUMBER_HPP)
  6. #define BOOST_VMD_IS_NUMBER_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/vmd/detail/is_number.hpp>
  10. /*
  11. The succeeding comments in this file are in doxygen format.
  12. */
  13. /** \file
  14. */
  15. /** \def BOOST_VMD_IS_NUMBER(sequence)
  16. \brief Tests whether a sequence is a Boost PP number.
  17. The macro checks to see if a sequence is a Boost PP number.
  18. A Boost PP number is a value from 0 to BOOST_PP_LIMIT_MAG.
  19. sequence = a possible number
  20. returns = 1 if the sequence is a Boost PP number,
  21. 0 if it is not.
  22. If the input is not a VMD data type this macro could lead to
  23. a preprocessor error. This is because the macro
  24. uses preprocessor concatenation to determine if the input
  25. is a number once it is determined that the input does not
  26. start with parenthesis. If the data being concatenated would
  27. lead to an invalid preprocessor token the compiler can issue
  28. a preprocessor error.
  29. */
  30. #define BOOST_VMD_IS_NUMBER(sequence) \
  31. BOOST_VMD_DETAIL_IS_NUMBER(sequence) \
  32. /**/
  33. #endif /* BOOST_PP_VARIADICS */
  34. #endif /* BOOST_VMD_IS_NUMBER_HPP */