]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/support/is_segmented.hpp
Updated boost to v1.55.0
[rsem.git] / boost / fusion / support / is_segmented.hpp
1 /*=============================================================================
2     Copyright (c) 2006 Eric Niebler
3
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_SEGMENTED_03202006_0015)
8 #define FUSION_IS_SEGMENTED_03202006_0015
9
10 #include <boost/mpl/bool.hpp>
11 #include <boost/fusion/support/tag_of.hpp>
12
13 namespace boost { namespace fusion 
14 {
15     // Special tags:
16     struct sequence_facade_tag;
17     struct iterator_range_tag;
18
19     namespace extension
20     {
21         template <typename Tag>
22         struct is_segmented_impl
23         {
24             template <typename Sequence>
25             struct apply
26               : mpl::false_
27             {};
28         };
29
30         template <>
31         struct is_segmented_impl<sequence_facade_tag>
32         {
33             template <typename Sequence>
34             struct apply : Sequence::is_segmented {};
35         };
36
37         template <>
38         struct is_segmented_impl<iterator_range_tag>;
39     }
40
41     namespace traits
42     {
43         template <typename Sequence>
44         struct is_segmented
45           : mpl::bool_<
46                 (bool)extension::is_segmented_impl<typename traits::tag_of<Sequence>::type>::
47                     template apply<Sequence>::type::value
48             >
49         {
50         };
51     }
52 }}
53
54 #endif