]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/view/nview/detail/at_impl.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / view / nview / detail / at_impl.hpp
1 /*=============================================================================
2 Copyright (c) 2009 Hartmut Kaiser
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
8 #if !defined(BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM)
9 #define BOOST_FUSION_NVIEW_AT_IMPL_SEP_24_2009_0225PM
10
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/sequence/intrinsic/at.hpp>
13 #include <boost/fusion/sequence/intrinsic/value_at.hpp>
14
15 namespace boost { namespace fusion
16 {
17 struct nview_tag;
18
19 namespace extension
20 {
21 template<typename Tag>
22 struct at_impl;
23
24 template<>
25 struct at_impl<nview_tag>
26 {
27 template<typename Sequence, typename N>
28 struct apply
29 {
30 typedef typename Sequence::sequence_type sequence_type;
31 typedef typename Sequence::index_type index_type;
32
33 typedef typename result_of::value_at<index_type, N>::type index;
34 typedef typename result_of::at<sequence_type, index>::type type;
35
36 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
37 static type
38 call(Sequence& seq)
39 {
40 return fusion::at<index>(seq.seq);
41 }
42 };
43 };
44 }
45
46 }}
47
48 #endif