]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/support/is_view.hpp
Added error detection for cases such as a read's two mates having different names...
[rsem.git] / boost / fusion / support / is_view.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
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_VIEW_03202006_0015)
8 #define FUSION_IS_VIEW_03202006_0015
9
10 #include <boost/mpl/bool.hpp>
11 #include <boost/fusion/support/detail/is_view.hpp>
12 #include <boost/fusion/support/tag_of.hpp>
13
14 namespace boost { namespace fusion
15 {
16     // Special tags:
17     struct sequence_facade_tag;
18     struct boost_tuple_tag; // boost::tuples::tuple tag
19     struct boost_array_tag; // boost::array tag
20     struct mpl_sequence_tag; // mpl sequence tag
21     struct std_pair_tag; // std::pair tag
22
23     namespace extension
24     {
25         template<typename Tag>
26         struct is_view_impl
27         {
28             template <typename T>
29             struct apply
30                 : detail::fusion_is_view<T>
31             {};
32         };
33
34         template <>
35         struct is_view_impl<sequence_facade_tag>
36         {
37             template <typename Sequence>
38             struct apply : Sequence::is_view {};
39         };
40
41         template <>
42         struct is_view_impl<boost_tuple_tag>;
43
44         template <>
45         struct is_view_impl<boost_array_tag>;
46
47         template <>
48         struct is_view_impl<mpl_sequence_tag>;
49
50         template <>
51         struct is_view_impl<std_pair_tag>;
52     }
53
54     namespace traits
55     {
56         template <typename T>
57         struct is_view :
58             mpl::bool_<
59                 (bool)extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
60                     template apply<T>::type::value
61             >
62         {};
63     }
64 }}
65
66 #endif