1 /*=============================================================================
2 Copyright (c) 2001-2006 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/type_traits/is_base_of.hpp>
11 #include <boost/fusion/support/sequence_base.hpp>
12 #include <boost/fusion/support/tag_of.hpp>
13 #include <boost/mpl/is_sequence.hpp>
14 #include <boost/mpl/or.hpp>
15 #include <boost/mpl/bool.hpp>
17 namespace boost { namespace fusion
20 struct non_fusion_tag;
21 struct boost_tuple_tag; // boost::tuples::tuple tag
22 struct boost_array_tag; // boost::array tag
23 struct mpl_sequence_tag; // mpl sequence tag
24 struct std_pair_tag; // std::pair tag
29 struct is_sequence_impl
31 template <typename Sequence>
32 struct apply : is_base_of<sequence_root, Sequence> {};
36 struct is_sequence_impl<non_fusion_tag>
39 struct apply : mpl::false_ {};
43 struct is_sequence_impl<boost_tuple_tag>;
46 struct is_sequence_impl<boost_array_tag>;
49 struct is_sequence_impl<mpl_sequence_tag>;
52 struct is_sequence_impl<std_pair_tag>;
59 : extension::is_sequence_impl<
60 typename fusion::detail::tag_of<T>::type