Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:34:58

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #if !defined(FUSION_TUPLE_10032005_0810)
0008 #define FUSION_TUPLE_10032005_0810
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/tuple/detail/tuple_fwd.hpp>
0012 #include <boost/fusion/container/vector/vector.hpp>
0013 #include <boost/fusion/sequence/intrinsic/size.hpp>
0014 #include <boost/fusion/sequence/intrinsic/value_at.hpp>
0015 #include <boost/fusion/sequence/intrinsic/at.hpp>
0016 #include <boost/fusion/sequence/comparison.hpp>
0017 #include <boost/fusion/sequence/io.hpp>
0018 #include <boost/utility/enable_if.hpp>
0019 #include <boost/type_traits/is_const.hpp>
0020 #include <boost/config/no_tr1/utility.hpp>
0021 
0022 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
0023 #include <boost/fusion/tuple/detail/preprocessed/tuple.hpp>
0024 #else
0025 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0026 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/tuple" FUSION_MAX_VECTOR_SIZE_STR ".hpp")
0027 #endif
0028 
0029 /*=============================================================================
0030     Copyright (c) 2001-2011 Joel de Guzman
0031 
0032     Distributed under the Boost Software License, Version 1.0. (See accompanying
0033     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0034 
0035     This is an auto-generated file. Do not edit!
0036 ==============================================================================*/
0037 
0038 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0039 #pragma wave option(preserve: 1)
0040 #endif
0041 
0042 namespace boost { namespace fusion
0043 {
0044     template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
0045     struct tuple : vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
0046     {
0047         typedef vector<
0048             BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
0049         base_type;
0050 
0051         BOOST_FUSION_GPU_ENABLED tuple()
0052             : base_type() {}
0053 
0054         BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs)
0055             : base_type(static_cast<base_type const&>(rhs)) {}
0056 
0057         template <typename U1, typename U2>
0058         BOOST_FUSION_GPU_ENABLED
0059         tuple(std::pair<U1, U2> const& rhs)
0060             : base_type(rhs) {}
0061 
0062         #include <boost/fusion/tuple/detail/tuple_expand.hpp>
0063 
0064         template <typename T>
0065         BOOST_FUSION_GPU_ENABLED
0066         tuple& operator=(T const& rhs)
0067         {
0068             base_type::operator=(rhs);
0069             return *this;
0070         }
0071 
0072         BOOST_FUSION_GPU_ENABLED
0073         tuple& operator=(tuple const& rhs)
0074         {
0075             base_type::operator=(static_cast<base_type const&>(rhs));
0076             return *this;
0077         }
0078 
0079         template <typename U1, typename U2>
0080         BOOST_FUSION_GPU_ENABLED
0081         tuple& operator=(std::pair<U1, U2> const& rhs)
0082         {
0083             base_type::operator=(rhs);
0084             return *this;
0085         }
0086     };
0087 
0088     template <typename Tuple>
0089     struct tuple_size : result_of::size<Tuple> {};
0090 
0091     template <int N, typename Tuple>
0092     struct tuple_element : result_of::value_at_c<Tuple, N> {};
0093 
0094     template <int N, typename Tuple>
0095     BOOST_FUSION_GPU_ENABLED
0096     inline typename
0097         lazy_disable_if<
0098             is_const<Tuple>
0099           , result_of::at_c<Tuple, N>
0100         >::type
0101     get(Tuple& tup)
0102     {
0103         return at_c<N>(tup);
0104     }
0105 
0106     template <int N, typename Tuple>
0107     BOOST_FUSION_GPU_ENABLED
0108     inline typename result_of::at_c<Tuple const, N>::type
0109     get(Tuple const& tup)
0110     {
0111         return at_c<N>(tup);
0112     }
0113 }}
0114 
0115 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0116 #pragma wave option(output: null)
0117 #endif
0118 
0119 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
0120 
0121 #endif
0122