vector_fwd.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*=============================================================================
  2. Copyright (c) 2014-2015 Kohei Takahashi
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #ifndef FUSION_VECTOR_FORWARD_11052014_1626
  7. #define FUSION_VECTOR_FORWARD_11052014_1626
  8. #include <boost/config.hpp>
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/fusion/container/vector/detail/config.hpp>
  11. ///////////////////////////////////////////////////////////////////////////////
  12. // With no variadics, we will use the C++03 version
  13. ///////////////////////////////////////////////////////////////////////////////
  14. #if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
  15. # include <boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp>
  16. #else
  17. ///////////////////////////////////////////////////////////////////////////////
  18. // C++11 interface
  19. ///////////////////////////////////////////////////////////////////////////////
  20. #include <boost/preprocessor/cat.hpp>
  21. #include <boost/preprocessor/repetition/repeat.hpp>
  22. namespace boost { namespace fusion
  23. {
  24. template <typename ...T>
  25. struct vector;
  26. #define FUSION_VECTOR_N_ALIASES(z, N, d) \
  27. template <typename ...T> \
  28. using BOOST_PP_CAT(vector, N) = vector<T...>;
  29. BOOST_PP_REPEAT(51, FUSION_VECTOR_N_ALIASES, ~)
  30. #undef FUSION_VECTOR_N_ALIASES
  31. }}
  32. #endif
  33. #endif