tag_of.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  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. #if !defined(BOOST_FUSION_TAG_OF_09112011_1842)
  7. #define BOOST_FUSION_TAG_OF_09112011_1842
  8. #include <boost/fusion/support/config.hpp>
  9. #include <tuple>
  10. #include <boost/fusion/support/tag_of_fwd.hpp>
  11. namespace boost { namespace fusion
  12. {
  13. struct std_tuple_tag;
  14. struct fusion_sequence_tag;
  15. namespace traits
  16. {
  17. template <typename... Elements>
  18. struct tag_of<std::tuple<Elements...>>
  19. {
  20. typedef std_tuple_tag type;
  21. };
  22. }
  23. }}
  24. namespace boost { namespace mpl
  25. {
  26. template <typename>
  27. struct sequence_tag;
  28. template <typename... Elements>
  29. struct sequence_tag<std::tuple<Elements...>>
  30. {
  31. typedef fusion::fusion_sequence_tag type;
  32. };
  33. template <typename... Elements>
  34. struct sequence_tag<std::tuple<Elements...> const>
  35. {
  36. typedef fusion::fusion_sequence_tag type;
  37. };
  38. }}
  39. #endif