123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #if !defined(FUSION_IS_VIEW_03202006_0015)
- #define FUSION_IS_VIEW_03202006_0015
- #include <boost/fusion/support/config.hpp>
- #include <boost/mpl/bool.hpp>
- #include <boost/fusion/support/tag_of.hpp>
- namespace boost { namespace fusion
- {
-
- struct non_fusion_tag;
- struct sequence_facade_tag;
- struct boost_tuple_tag;
- struct boost_array_tag;
- struct mpl_sequence_tag;
- struct std_pair_tag;
- namespace extension
- {
- template<typename Tag>
- struct is_view_impl
- {
- template <typename T>
- struct apply
- {
- typedef typename T::is_view type;
- };
- };
- template <>
- struct is_view_impl<non_fusion_tag>
- {
- template <typename T>
- struct apply : mpl::false_ {};
- };
- template <>
- struct is_view_impl<sequence_facade_tag>
- {
- template <typename Sequence>
- struct apply : Sequence::is_view {};
- };
- template <>
- struct is_view_impl<boost_tuple_tag>;
- template <>
- struct is_view_impl<boost_array_tag>;
- template <>
- struct is_view_impl<mpl_sequence_tag>;
- template <>
- struct is_view_impl<std_pair_tag>;
- }
- namespace traits
- {
- template <typename T>
- struct is_view :
- mpl::bool_<
- (bool)extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
- template apply<T>::type::value
- >
- {};
- }
- }}
- #endif
|