File indexing completed on 2025-01-18 09:34:43
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_IS_VIEW_03202006_0015)
0008 #define FUSION_IS_VIEW_03202006_0015
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/mpl/bool.hpp>
0012 #include <boost/fusion/support/tag_of.hpp>
0013
0014 namespace boost { namespace fusion
0015 {
0016
0017 struct non_fusion_tag;
0018 struct sequence_facade_tag;
0019 struct boost_tuple_tag;
0020 struct boost_array_tag;
0021 struct mpl_sequence_tag;
0022 struct std_pair_tag;
0023
0024 namespace extension
0025 {
0026 template<typename Tag>
0027 struct is_view_impl
0028 {
0029 template <typename T>
0030 struct apply
0031 {
0032 typedef typename T::is_view type;
0033 };
0034 };
0035
0036 template <>
0037 struct is_view_impl<non_fusion_tag>
0038 {
0039 template <typename T>
0040 struct apply : mpl::false_ {};
0041 };
0042
0043 template <>
0044 struct is_view_impl<sequence_facade_tag>
0045 {
0046 template <typename Sequence>
0047 struct apply : Sequence::is_view {};
0048 };
0049
0050 template <>
0051 struct is_view_impl<boost_tuple_tag>;
0052
0053 template <>
0054 struct is_view_impl<boost_array_tag>;
0055
0056 template <>
0057 struct is_view_impl<mpl_sequence_tag>;
0058
0059 template <>
0060 struct is_view_impl<std_pair_tag>;
0061 }
0062
0063 namespace traits
0064 {
0065 template <typename T>
0066 struct is_view :
0067 mpl::bool_<
0068 (bool)extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
0069 template apply<T>::type::value
0070 >
0071 {};
0072 }
0073 }}
0074
0075 #endif