1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141)
9 #define BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/support/detail/mpl_iterator_category.hpp>
13 #include <boost/mpl/begin_end.hpp>
14 #include <boost/mpl/is_sequence.hpp>
15 #include <boost/static_assert.hpp>
17 namespace boost { namespace fusion {
22 struct mpl_sequence_category_of
24 // assumes T is an mpl sequence
25 // there should be no way this will ever be
26 // called where T is an mpl iterator
28 BOOST_STATIC_ASSERT(mpl::is_sequence<T>::value);
30 mpl_iterator_category<
31 typename mpl::begin<T>::type::category
37 struct mpl_sequence_tag;
41 template<typename Tag>
42 struct category_of_impl;
45 struct category_of_impl<mpl_sequence_tag>
49 : detail::mpl_sequence_category_of<T>