make_variant_list.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //-----------------------------------------------------------------------------
  2. // boost variant/detail/make_variant_list.hpp header file
  3. // See http://www.boost.org for updates, documentation, and revision history.
  4. //-----------------------------------------------------------------------------
  5. //
  6. // Copyright (c) 2002-2003 Eric Friedman, Itay Maman
  7. // Copyright (c) 2013-2024 Antony Polukhin
  8. //
  9. // Distributed under the Boost Software License, Version 1.0. (See
  10. // accompanying file LICENSE_1_0.txt or copy at
  11. // http://www.boost.org/LICENSE_1_0.txt)
  12. #ifndef BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
  13. #define BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP
  14. #include <boost/variant/variant_fwd.hpp>
  15. #include <boost/mpl/list.hpp>
  16. #include <boost/preprocessor/cat.hpp>
  17. #include <boost/preprocessor/enum.hpp>
  18. namespace boost { namespace detail { namespace variant {
  19. ///////////////////////////////////////////////////////////////////////////////
  20. // (detail) metafunction make_variant_list
  21. //
  22. // Provides a MPL-compatible sequence with the specified non-void types
  23. // as arguments.
  24. //
  25. // Rationale: see class template convert_void (variant_fwd.hpp) and using-
  26. // declaration workaround (below).
  27. //
  28. template < typename... T >
  29. struct make_variant_list
  30. {
  31. typedef typename mpl::list< T... >::type type;
  32. };
  33. }}} // namespace boost::detail::variant
  34. #endif // BOOST_VARIANT_DETAIL_MAKE_VARIANT_LIST_HPP