enum.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. # /* **************************************************************************
  2. # * *
  3. # * (C) Copyright Edward Diener 2011. *
  4. # * (C) Copyright Paul Mensonides 2011. *
  5. # * Distributed under the Boost Software License, Version 1.0. (See *
  6. # * accompanying file LICENSE_1_0.txt or copy at *
  7. # * http://www.boost.org/LICENSE_1_0.txt) *
  8. # * *
  9. # ************************************************************************** */
  10. #
  11. # /* See http://www.boost.org for most recent version. */
  12. #
  13. # ifndef BOOST_PREPROCESSOR_ARRAY_ENUM_HPP
  14. # define BOOST_PREPROCESSOR_ARRAY_ENUM_HPP
  15. #
  16. # include <boost/preprocessor/cat.hpp>
  17. # include <boost/preprocessor/config/config.hpp>
  18. # include <boost/preprocessor/tuple/rem.hpp>
  19. #
  20. # /* BOOST_PP_ARRAY_ENUM */
  21. #
  22. # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
  23. # define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(BOOST_PP_TUPLE_REM_CTOR, array)
  24. # define BOOST_PP_ARRAY_ENUM_I(m, args) BOOST_PP_ARRAY_ENUM_II(m, args)
  25. # define BOOST_PP_ARRAY_ENUM_II(m, args) BOOST_PP_CAT(m ## args,)
  26. # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
  27. # define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_ARRAY_ENUM_I(array)
  28. # define BOOST_PP_ARRAY_ENUM_I(array) BOOST_PP_TUPLE_REM_CTOR ## array
  29. # else
  30. # define BOOST_PP_ARRAY_ENUM(array) BOOST_PP_TUPLE_REM_CTOR array
  31. # endif
  32. #
  33. # endif