tag_of.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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(FUSION_SEQUENCE_TAG_OF_27122005_1030)
  8. #define FUSION_SEQUENCE_TAG_OF_27122005_1030
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/fusion/support/tag_of_fwd.hpp>
  11. #include <cstddef>
  12. namespace boost
  13. {
  14. template<typename T, std::size_t N>
  15. class array;
  16. }
  17. namespace boost { namespace fusion
  18. {
  19. struct boost_array_tag;
  20. struct fusion_sequence_tag;
  21. namespace traits
  22. {
  23. template<typename T, std::size_t N>
  24. #if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
  25. struct tag_of<boost::array<T,N>, void >
  26. #else
  27. struct tag_of<boost::array<T,N> >
  28. #endif
  29. {
  30. typedef boost_array_tag type;
  31. };
  32. }
  33. }}
  34. namespace boost { namespace mpl
  35. {
  36. template<typename>
  37. struct sequence_tag;
  38. template<typename T, std::size_t N>
  39. struct sequence_tag<array<T,N> >
  40. {
  41. typedef fusion::fusion_sequence_tag type;
  42. };
  43. template<typename T, std::size_t N>
  44. struct sequence_tag<array<T,N> const>
  45. {
  46. typedef fusion::fusion_sequence_tag type;
  47. };
  48. }}
  49. #endif