Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:31:07

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2005-2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying 
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141)
0009 #define BOOST_FUSION_CATEGORY_OF_IMPL_20060217_2141
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/support/detail/mpl_iterator_category.hpp>
0013 #include <boost/mpl/begin_end.hpp>
0014 #include <boost/mpl/is_sequence.hpp>
0015 #include <boost/static_assert.hpp>
0016 
0017 namespace boost { namespace fusion {
0018 
0019     namespace detail
0020     {
0021         template <typename T>
0022         struct mpl_sequence_category_of
0023         {
0024             // assumes T is an mpl sequence
0025             // there should be no way this will ever be
0026             // called where T is an mpl iterator
0027         
0028             BOOST_STATIC_ASSERT(mpl::is_sequence<T>::value);
0029             typedef typename 
0030                 mpl_iterator_category<
0031                     typename mpl::begin<T>::type::category
0032                 >::type
0033             type;
0034         };
0035     }
0036 
0037     struct mpl_sequence_tag;
0038 
0039     namespace extension
0040     {
0041         template<typename Tag>
0042         struct category_of_impl;
0043 
0044         template<>
0045         struct category_of_impl<mpl_sequence_tag>
0046         {
0047             template<typename T>
0048             struct apply
0049                 : detail::mpl_sequence_category_of<T>
0050             {};
0051         };
0052     }
0053 }}
0054 
0055 #endif