Project revived from Feb2017
[EroSomnia.git] / deps / boost_1_63_0 / boost / fusion / adapted / boost_array / detail / at_impl.hpp
blobe355d02240054c78cec18bc4ebce3cdcde73e670
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_FUSION_AT_IMPL_27122005_1241)
9 #define BOOST_FUSION_AT_IMPL_27122005_1241
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/type_traits/is_const.hpp>
14 #include <boost/mpl/if.hpp>
16 namespace boost { namespace fusion {
18 struct boost_array_tag;
20 namespace extension
22 template<typename T>
23 struct at_impl;
25 template<>
26 struct at_impl<boost_array_tag>
28 template<typename Sequence, typename N>
29 struct apply
31 typedef typename mpl::if_<
32 is_const<Sequence>,
33 typename Sequence::const_reference,
34 typename Sequence::reference>::type type;
36 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
37 static type
38 call(Sequence& seq)
40 return seq[N::value];
47 #endif