Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-12 08:46:42

0001 /*=============================================================================
0002     Copyright (c) 2001-2011 Joel de Guzman
0003     Copyright (c) 2017 Kohei Takahashi
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #if !defined(FUSION_VECTOR_07072005_1244)
0009 #define FUSION_VECTOR_07072005_1244
0010 
0011 #include <boost/preprocessor/iterate.hpp>
0012 #include <boost/preprocessor/repetition/enum_params.hpp>
0013 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0014 #include <boost/fusion/support/config.hpp>
0015 #include <boost/fusion/support/void.hpp>
0016 #include <boost/fusion/support/detail/enabler.hpp>
0017 #include <boost/fusion/support/is_sequence.hpp>
0018 #include <boost/fusion/container/vector/vector_fwd.hpp>
0019 #include <boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp>
0020 #include <boost/fusion/sequence/intrinsic/begin.hpp>
0021 #include <boost/mpl/at.hpp>
0022 #include <boost/mpl/bool.hpp>
0023 #include <boost/type_traits/add_reference.hpp>
0024 #include <boost/type_traits/add_const.hpp>
0025 #include <boost/type_traits/is_base_of.hpp>
0026 #include <boost/type_traits/remove_cv_ref.hpp>
0027 #include <boost/detail/workaround.hpp>
0028 #include <boost/core/enable_if.hpp>
0029 
0030 #define FUSION_HASH 0031 
0032 ">#
0033 
0034 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
0035 
0036 #define BOOST_FUSION_VECTOR_COPY_INIT()                                       \
0037     ctor_helper(rhs, is_base_of<vector, Sequence>())                          \
0038 
0039 #define BOOST_FUSION_VECTOR_CTOR_HELPER()                                     \
0040     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                  \
0041     static vector_n const&                                                    \
0042     ctor_helper(vector const& rhs, mpl::true_)                                \
0043     {                                                                         \
0044         return rhs.vec;                                                       \
0045     }                                                                         \
0046                                                                               \
0047     template <typename T>                                                     \
0048     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                  \
0049     static T const&                                                           \
0050     ctor_helper(T const& rhs, mpl::false_)                                    \
0051     {                                                                         \
0052         return rhs;                                                           \
0053     }
0054 
0055 #else
0056 
0057 #define BOOST_FUSION_VECTOR_COPY_INIT()                                       \
0058     rhs                                                                       \
0059 
0060 #define BOOST_FUSION_VECTOR_CTOR_HELPER()
0061 
0062 #endif
0063 
0064 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
0065 #include <boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp>
0066 #else
0067 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0068 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/vvector" FUSION_MAX_VECTOR_SIZE_STR ".hpp")
0069 #endif
0070 
0071 /*=============================================================================
0072     Copyright (c) 2001-2011 Joel de Guzman
0073 
0074     Distributed under the Boost Software License, Version 1.0. (See accompanying
0075     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0076 
0077     This is an auto-generated file. Do not edit!
0078 ==============================================================================*/
0079 
0080 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0081 #pragma wave option(preserve: 1)
0082 #endif
0083 
0084 namespace boost { namespace fusion
0085 {
0086     struct void_;
0087     struct fusion_sequence_tag;
0088 
0089     template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
0090     struct vector
0091         : sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> >
0092     {
0093     private:
0094 
0095         typedef typename detail::vector_n_chooser<
0096             BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
0097         vector_n;
0098 
0099         template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
0100         friend struct vector;
0101 
0102     public:
0103 
0104         typedef typename vector_n::types types;
0105         typedef typename vector_n::fusion_tag fusion_tag;
0106         typedef typename vector_n::tag tag;
0107         typedef typename vector_n::size size;
0108         typedef typename vector_n::category category;
0109         typedef typename vector_n::is_view is_view;
0110 
0111         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0112         vector()
0113             : vec() {}
0114 
0115         template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
0116         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0117         vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
0118             : vec(rhs.vec) {}
0119 
0120         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0121         vector(vector const& rhs)
0122             : vec(rhs.vec) {}
0123 
0124         template <typename Sequence>
0125         BOOST_FUSION_GPU_ENABLED
0126         vector(Sequence const& rhs,
0127             typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
0128             : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
0129 
0130         //  Expand a couple of forwarding constructors for arguments
0131         //  of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
0132         //
0133         //  vector(
0134         //      typename detail::call_param<T0>::type arg0
0135         //    , typename detail::call_param<T1>::type arg1)
0136         //    : vec(arg0, arg1) {}
0137         #include <boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp>
0138 
0139         template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
0140         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0141         vector&
0142         operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
0143         {
0144             vec = rhs.vec;
0145             return *this;
0146         }
0147 
0148         template <typename T>
0149         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0150         vector&
0151         operator=(T const& rhs)
0152         {
0153             vec = rhs;
0154             return *this;
0155         }
0156 
0157         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0158         vector&
0159         operator=(vector const& rhs)
0160         {
0161             vec = rhs.vec;
0162             return *this;
0163         }
0164 
0165 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0166 FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0167 #endif
0168 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
0169     (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
0170         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0171         vector(vector&& rhs)
0172             : vec(std::forward<vector_n>(rhs.vec)) {}
0173 
0174         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0175         vector&
0176         operator=(vector&& rhs)
0177         {
0178             vec = std::forward<vector_n>(rhs.vec);
0179             return *this;
0180         }
0181 
0182         template <typename T>
0183         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0184         typename boost::disable_if_c<
0185             boost::is_same<vector, typename boost::remove_cv_ref<T>::type>::value
0186           , vector&
0187         >::type
0188         operator=(T&& rhs)
0189         {
0190             vec = BOOST_FUSION_FWD_ELEM(T, rhs);
0191             return *this;
0192         }
0193 #endif
0194 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0195 FUSION_HASH endif
0196 #endif
0197 
0198         template <int N>
0199         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0200         typename add_reference<
0201             typename mpl::at_c<types, N>::type
0202         >::type
0203         at_impl(mpl::int_<N> index)
0204         {
0205             return vec.at_impl(index);
0206         }
0207 
0208         template <int N>
0209         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0210         typename add_reference<
0211             typename add_const<
0212                 typename mpl::at_c<types, N>::type
0213             >::type
0214         >::type
0215         at_impl(mpl::int_<N> index) const
0216         {
0217             return vec.at_impl(index);
0218         }
0219 
0220         template <typename I>
0221         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0222         typename add_reference<
0223             typename mpl::at<types, I>::type
0224         >::type
0225         at_impl(I /*index*/)
0226         {
0227             return vec.at_impl(mpl::int_<I::value>());
0228         }
0229 
0230         template<typename I>
0231         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0232         typename add_reference<
0233             typename add_const<
0234                 typename mpl::at<types, I>::type
0235             >::type
0236         >::type
0237         at_impl(I /*index*/) const
0238         {
0239             return vec.at_impl(mpl::int_<I::value>());
0240         }
0241 
0242     private:
0243 
0244         BOOST_FUSION_VECTOR_CTOR_HELPER()
0245         vector_n vec;
0246     };
0247 }}
0248 
0249 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0250 #pragma wave option(output: null)
0251 #endif
0252 
0253 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
0254 
0255 #undef FUSION_HASH
0256 #endif