is_empty_list.hpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_EMPTY_LIST_HPP)
  6. #define BOOST_VMD_IS_EMPTY_LIST_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/vmd/detail/is_list.hpp>
  10. /*
  11. The succeeding comments in this file are in doxygen format.
  12. */
  13. /** \file
  14. */
  15. /** \def BOOST_VMD_IS_EMPTY_LIST(sequence)
  16. \brief Tests whether a sequence is an empty Boost PP list.
  17. An empty Boost PP list consists of the single identifier 'BOOST_PP_NIL'.
  18. This identifier also serves as a list terminator for a non-empty list.
  19. sequence = a preprocessor parameter
  20. returns = 1 if the sequence is an empty Boost PP list,
  21. 0 if it is not.
  22. The macro will generate a preprocessing error if the input
  23. as an empty list marker, instead of being an identifier, is
  24. a preprocessor token which VMD cannot parse, as in the
  25. example '&BOOST_PP_NIL'.
  26. */
  27. #define BOOST_VMD_IS_EMPTY_LIST(sequence) \
  28. BOOST_VMD_DETAIL_IS_LIST_IS_EMPTY_LIST_PROCESS(sequence) \
  29. /**/
  30. /** \def BOOST_VMD_IS_EMPTY_LIST_D(d,sequence)
  31. \brief Tests whether a sequence is an empty Boost PP list. Re-entrant version.
  32. An empty Boost PP list consists of the single identifier 'BOOST_PP_NIL'.
  33. This identifier also serves as a list terminator for a non-empty list.
  34. d = The next available BOOST_PP_WHILE iteration <br/>
  35. sequence = a preprocessor parameter
  36. returns = 1 if the sequence is an empty Boost PP list,
  37. 0 if it is not.
  38. The macro will generate a preprocessing error if the input
  39. as an empty list marker, instead of being an identifier, is
  40. a preprocessor token which VMD cannot parse, as in the
  41. example '&BOOST_PP_NIL'.
  42. */
  43. #define BOOST_VMD_IS_EMPTY_LIST_D(d,sequence) \
  44. BOOST_VMD_DETAIL_IS_LIST_IS_EMPTY_LIST_PROCESS_D(d,sequence) \
  45. /**/
  46. #endif /* BOOST_PP_VARIADICS */
  47. #endif /* BOOST_VMD_IS_EMPTY_LIST_HPP */