is_general_identifier.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // (C) Copyright Edward Diener 2020
  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_GENERAL_IDENTIFIER_HPP)
  6. #define BOOST_VMD_IS_GENERAL_IDENTIFIER_HPP
  7. #include <boost/vmd/detail/setup.hpp>
  8. #if BOOST_PP_VARIADICS
  9. #include <boost/vmd/detail/is_general_identifier.hpp>
  10. /*
  11. The succeeding comments in this file are in doxygen format.
  12. */
  13. /** \file
  14. */
  15. /** \def BOOST_VMD_IS_GENERAL_IDENTIFIER(...)
  16. \brief Tests whether a parameter is a general identifier.
  17. ... = variadic parameters
  18. The first variadic parameter is required and it is the input to test.
  19. Passing more than one variadic argument is an error.
  20. @code
  21. returns = 1 if the parameter is any general identifier and only a single variadic argument is given, otherwise 0.
  22. @endcode
  23. The argument to the macro should be a single possible identifier
  24. and not a VMD sequence of preprocessor tokens.
  25. If the input is not a VMD data type this macro could lead to
  26. a preprocessor error. This is because the macro
  27. uses preprocessor concatenation to determine if the input
  28. is an identifier once it is determined that the input is not empty
  29. and does not start with parenthesis. If the data being concatenated would
  30. lead to an invalid preprocessor token the compiler can issue
  31. a preprocessor error.
  32. */
  33. #define BOOST_VMD_IS_GENERAL_IDENTIFIER(...) \
  34. BOOST_VMD_DETAIL_IS_GENERAL_IDENTIFIER(__VA_ARGS__) \
  35. /**/
  36. #endif /* BOOST_PP_VARIADICS */
  37. #endif /* BOOST_VMD_IS_GENERAL_IDENTIFIER_HPP */