1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_IS_SEQUENCE_05052005_1002)
8 #define FUSION_IS_SEQUENCE_05052005_1002
10 #include <boost/fusion/support/sequence_base.hpp>
11 #include <boost/fusion/support/tag_of.hpp>
12 #include <boost/mpl/is_sequence.hpp>
13 #include <boost/mpl/or.hpp>
14 #include <boost/mpl/bool.hpp>
15 #include <boost/type_traits/is_convertible.hpp>
16 #include <boost/type_traits/is_same.hpp>
18 namespace boost { namespace fusion
21 struct non_fusion_tag;
22 struct boost_tuple_tag; // boost::tuples::tuple tag
23 struct boost_array_tag; // boost::array tag
24 struct mpl_sequence_tag; // mpl sequence tag
25 struct std_pair_tag; // std::pair tag
30 struct is_sequence_impl
32 template <typename Sequence>
34 : is_convertible<Sequence, detail::from_sequence_convertible_type>
39 struct is_sequence_impl<non_fusion_tag>
42 struct apply : mpl::false_ {};
46 struct is_sequence_impl<boost_tuple_tag>;
49 struct is_sequence_impl<boost_array_tag>;
52 struct is_sequence_impl<mpl_sequence_tag>;
55 struct is_sequence_impl<std_pair_tag>;
63 (bool)extension::is_sequence_impl<
64 typename fusion::detail::tag_of<T>::type
65 >::template apply<T>::type::value
69 template <typename Sequence, typename Enable = void>
70 struct is_native_fusion_sequence
71 : is_convertible<Sequence, detail::from_sequence_convertible_type>