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