/Src/Dependencies/Boost/boost/fusion/support/is_view.hpp

http://hadesmem.googlecode.com/ · C++ Header · 63 lines · 46 code · 10 blank · 7 comment · 0 complexity · 77a9795d433e381b71b210435107be65 MD5 · raw file

  1. /*=============================================================================
  2. Copyright (c) 2001-2006 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(FUSION_IS_VIEW_03202006_0015)
  7. #define FUSION_IS_VIEW_03202006_0015
  8. #include <boost/fusion/support/detail/is_view.hpp>
  9. #include <boost/fusion/support/tag_of.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. // Special tags:
  13. struct sequence_facade_tag;
  14. struct boost_tuple_tag; // boost::tuples::tuple tag
  15. struct boost_array_tag; // boost::array tag
  16. struct mpl_sequence_tag; // mpl sequence tag
  17. struct std_pair_tag; // std::pair tag
  18. namespace extension
  19. {
  20. template<typename Tag>
  21. struct is_view_impl
  22. {
  23. template <typename T>
  24. struct apply
  25. : detail::fusion_is_view<T>
  26. {};
  27. };
  28. template <>
  29. struct is_view_impl<sequence_facade_tag>
  30. {
  31. template <typename Sequence>
  32. struct apply : Sequence::is_view {};
  33. };
  34. template <>
  35. struct is_view_impl<boost_tuple_tag>;
  36. template <>
  37. struct is_view_impl<boost_array_tag>;
  38. template <>
  39. struct is_view_impl<mpl_sequence_tag>;
  40. template <>
  41. struct is_view_impl<std_pair_tag>;
  42. }
  43. namespace traits
  44. {
  45. template <typename T>
  46. struct is_view :
  47. extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
  48. template apply<T>::type
  49. {};
  50. }
  51. }}
  52. #endif