]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/sequence/intrinsic/end.hpp
Added posterior standard deviation of counts as output if either '--calc-pme' or...
[rsem.git] / boost / fusion / sequence / intrinsic / end.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2006 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_END_04052005_1141)
8 #define FUSION_END_04052005_1141
9
10 #include <boost/fusion/support/tag_of.hpp>
11
12 namespace boost { namespace fusion
13 {
14     // Special tags:
15     struct sequence_facade_tag;
16     struct boost_tuple_tag; // boost::tuples::tuple tag
17     struct boost_array_tag; // boost::array tag
18     struct mpl_sequence_tag; // mpl sequence tag
19     struct std_pair_tag; // std::pair tag
20
21     namespace extension
22     {
23         template <typename Tag>
24         struct end_impl
25         {
26             template <typename Sequence>
27             struct apply;
28         };
29
30         template <>
31         struct end_impl<sequence_facade_tag>
32         {
33             template <typename Sequence>
34             struct apply : Sequence::template end<Sequence> {};
35         };
36
37         template <>
38         struct end_impl<boost_tuple_tag>;
39
40         template <>
41         struct end_impl<boost_array_tag>;
42
43         template <>
44         struct end_impl<mpl_sequence_tag>;
45
46         template <>
47         struct end_impl<std_pair_tag>;
48     }
49
50     namespace result_of
51     {
52         template <typename Sequence>
53         struct end
54             : extension::end_impl<typename detail::tag_of<Sequence>::type>::
55                 template apply<Sequence>
56         {};
57     }
58
59     template <typename Sequence>
60     inline typename result_of::end<Sequence>::type const
61     end(Sequence& seq)
62     {
63         return result_of::end<Sequence>::call(seq);
64     }
65
66     template <typename Sequence>
67     inline typename result_of::end<Sequence const>::type const
68     end(Sequence const& seq)
69     {
70         return result_of::end<Sequence const>::call(seq);
71     }
72 }}
73
74 #endif