]> git.donarmstrong.com Git - rsem.git/blob - boost/fusion/sequence/intrinsic/value_at.hpp
Added posterior standard deviation of counts as output if either '--calc-pme' or...
[rsem.git] / boost / fusion / sequence / intrinsic / value_at.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_VALUE_AT_05052005_0229)
8 #define FUSION_VALUE_AT_05052005_0229
9
10 #include <boost/mpl/int.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 boost_tuple_tag; // boost::tuples::tuple tag
18     struct boost_array_tag; // boost::array tag
19     struct mpl_sequence_tag; // mpl sequence tag
20     struct std_pair_tag; // std::pair tag
21
22     namespace extension
23     {
24         template <typename Tag>
25         struct value_at_impl
26         {
27             template <typename Sequence, typename N>
28             struct apply;
29         };
30
31         template <>
32         struct value_at_impl<sequence_facade_tag>
33         {
34             template <typename Sequence, typename N>
35             struct apply : Sequence::template value_at<Sequence, N> {};
36         };
37
38         template <>
39         struct value_at_impl<boost_tuple_tag>;
40
41         template <>
42         struct value_at_impl<boost_array_tag>;
43
44         template <>
45         struct value_at_impl<mpl_sequence_tag>;
46
47         template <>
48         struct value_at_impl<std_pair_tag>;
49     }
50
51     namespace result_of
52     {
53         template <typename Sequence, typename N>
54         struct value_at
55             : extension::value_at_impl<typename detail::tag_of<Sequence>::type>::
56                 template apply<Sequence, N>
57         {};
58
59         template <typename Sequence, int N>
60         struct value_at_c
61             : fusion::result_of::value_at<Sequence, mpl::int_<N> >
62         {};
63     }
64 }}
65
66 #endif
67