tag_of.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2005-2006 Dan Marsden
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(BOOST_FUSION_STD_ARRAY_TAG_OF_01062013_1700)
  8. #define BOOST_FUSION_STD_ARRAY_TAG_OF_01062013_1700
  9. #include <boost/fusion/support/tag_of_fwd.hpp>
  10. #include <array>
  11. #include <cstddef>
  12. namespace boost { namespace fusion
  13. {
  14. struct std_array_tag;
  15. struct fusion_sequence_tag;
  16. namespace traits
  17. {
  18. template<typename T, std::size_t N>
  19. #if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
  20. struct tag_of<std::array<T,N>, void >
  21. #else
  22. struct tag_of<std::array<T,N> >
  23. #endif
  24. {
  25. typedef std_array_tag type;
  26. };
  27. }
  28. }}
  29. namespace boost { namespace mpl
  30. {
  31. template<typename>
  32. struct sequence_tag;
  33. template<typename T, std::size_t N>
  34. struct sequence_tag<std::array<T,N> >
  35. {
  36. typedef fusion::fusion_sequence_tag type;
  37. };
  38. template<typename T, std::size_t N>
  39. struct sequence_tag<std::array<T,N> const>
  40. {
  41. typedef fusion::fusion_sequence_tag type;
  42. };
  43. }}
  44. #endif