Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:31:08

0001 /*=============================================================================
0002     Copyright (c) 2012 Nathan Ridge
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 
0008 #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP
0009 #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEFINE_STRUCT_INLINE_HPP
0010 
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/config.hpp>
0013 #include <boost/fusion/support/category_of.hpp>
0014 #include <boost/fusion/sequence/sequence_facade.hpp>
0015 #include <boost/fusion/iterator/iterator_facade.hpp>
0016 #include <boost/fusion/algorithm/auxiliary/copy.hpp>
0017 #include <boost/fusion/adapted/struct/detail/define_struct.hpp>
0018 #include <boost/mpl/int.hpp>
0019 #include <boost/mpl/bool.hpp>
0020 #include <boost/mpl/identity.hpp>
0021 #include <boost/mpl/minus.hpp>
0022 #include <boost/mpl/if.hpp>
0023 #include <boost/type_traits/is_const.hpp>
0024 #include <boost/preprocessor/comma_if.hpp>
0025 #include <boost/preprocessor/facilities/empty.hpp>
0026 #include <boost/preprocessor/repeat.hpp>
0027 #include <boost/preprocessor/seq/for_each_i.hpp>
0028 #include <boost/preprocessor/seq/size.hpp>
0029 #include <boost/preprocessor/seq/enum.hpp>
0030 #include <boost/preprocessor/seq/seq.hpp>
0031 #include <boost/preprocessor/tuple/elem.hpp>
0032 
0033 // MSVC and GCC <= 4.4 have a bug that affects partial specializations of
0034 // nested templates under some circumstances. This affects the implementation
0035 // of BOOST_FUSION_DEFINE_STRUCT_INLINE, which uses such specializations for
0036 // the iterator class's 'deref' and 'value_of' metafunctions. On these compilers
0037 // an alternate implementation for these metafunctions is used that does not 
0038 // require such specializations. The alternate implementation takes longer
0039 // to compile so its use is restricted to the offending compilers.
0040 // For MSVC, the bug was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates
0041 // For GCC, 4.4 and earlier are no longer maintained so there is no need
0042 // to report a bug.
0043 #if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4)))
0044     #define BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND 
0045 #endif
0046 
0047 #ifdef BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
0048 #include <boost/type_traits/add_const.hpp>
0049 #include <boost/type_traits/remove_const.hpp>
0050 #include <boost/mpl/if.hpp>
0051 #include <boost/fusion/sequence/intrinsic/at_c.hpp>
0052 #include <boost/fusion/container/vector.hpp>
0053 #endif
0054 
0055 
0056 #define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE)        \
0057     BOOST_PP_COMMA_IF(N) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)()
0058 
0059 #define BOOST_FUSION_MAKE_DEFAULT_INIT_LIST(ATTRIBUTES_SEQ)                     \
0060             : BOOST_PP_SEQ_FOR_EACH_I(                                          \
0061               BOOST_FUSION_MAKE_DEFAULT_INIT_LIST_ENTRY,                        \
0062               ~,                                                                \
0063               ATTRIBUTES_SEQ)                                                   \
0064 
0065 #define BOOST_FUSION_IGNORE_2(ARG1, ARG2)
0066 
0067 #define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ)                \
0068     BOOST_FUSION_GPU_ENABLED                                                    \
0069     NAME(BOOST_PP_SEQ_FOR_EACH_I(                                               \
0070             BOOST_FUSION_MAKE_CONST_REF_PARAM,                                  \
0071             ~,                                                                  \
0072             ATTRIBUTES_SEQ))                                                    \
0073         : BOOST_PP_SEQ_FOR_EACH_I(                                              \
0074               BOOST_FUSION_MAKE_INIT_LIST_ENTRY,                                \
0075               ~,                                                                \
0076               ATTRIBUTES_SEQ)                                                   \
0077     {                                                                           \
0078     }                                                                           \
0079 
0080 #define BOOST_FUSION_MAKE_CONST_REF_PARAM(R, DATA, N, ATTRIBUTE)                \
0081     BOOST_PP_COMMA_IF(N)                                                        \
0082     BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) const&                                 \
0083     BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)
0084 
0085 #define BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(NAME) NAME(NAME)
0086 
0087 #define BOOST_FUSION_MAKE_INIT_LIST_ENTRY(R, DATA, N, ATTRIBUTE)                \
0088     BOOST_PP_COMMA_IF(N)                                                        \
0089     BOOST_FUSION_MAKE_INIT_LIST_ENTRY_I(BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE))
0090 
0091 #define BOOST_FUSION_ITERATOR_NAME(NAME)                                        \
0092     BOOST_PP_CAT(boost_fusion_detail_, BOOST_PP_CAT(NAME, _iterator))
0093 
0094 // Note: all template parameter names need to be uglified, otherwise they might
0095 //       shadow a template parameter of the struct when used with
0096 //       BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE
0097 
0098 #define BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS(Z, N, NAME)                   \
0099     template <typename boost_fusion_detail_Sq>                                  \
0100     struct value_of<                                                            \
0101                BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, N>      \
0102            >                                                                    \
0103         : boost::mpl::identity<                                                 \
0104               typename boost_fusion_detail_Sq::t##N##_type                      \
0105           >                                                                     \
0106     {                                                                           \
0107     };
0108 
0109 #define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC(                                  \
0110     SPEC_TYPE, CALL_ARG_TYPE, TYPE_QUAL, ATTRIBUTE, N)                          \
0111                                                                                 \
0112     template <typename boost_fusion_detail_Sq>                                  \
0113     struct deref<SPEC_TYPE, N> >                                                \
0114     {                                                                           \
0115         typedef typename boost_fusion_detail_Sq::t##N##_type TYPE_QUAL& type;   \
0116         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                \
0117         static type call(CALL_ARG_TYPE, N> const& iter)                         \
0118         {                                                                       \
0119             return iter.seq_.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE);              \
0120         }                                                                       \
0121     };
0122 
0123 #define BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS(R, NAME, N, ATTRIBUTE)           \
0124     BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC(                                      \
0125         BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq,                \
0126         BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq,                \
0127         ,                                                                       \
0128         ATTRIBUTE,                                                              \
0129         N)                                                                      \
0130     BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC(                                      \
0131         BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq,          \
0132         BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq,          \
0133         const,                                                                  \
0134         ATTRIBUTE,                                                              \
0135         N)                                                                      \
0136     BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC(                                      \
0137         const BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq,          \
0138         BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq,                \
0139         ,                                                                       \
0140         ATTRIBUTE,                                                              \
0141         N)                                                                      \
0142     BOOST_FUSION_MAKE_ITERATOR_DEREF_SPEC(                                      \
0143         const BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq,    \
0144         BOOST_FUSION_ITERATOR_NAME(NAME)<const boost_fusion_detail_Sq,          \
0145         const,                                                                  \
0146         ATTRIBUTE,                                                              \
0147         N)                                                                      \
0148 
0149 #define BOOST_FUSION_MAKE_VALUE_AT_SPECS(Z, N, DATA)                            \
0150     template <typename boost_fusion_detail_Sq>                                  \
0151     struct value_at<boost_fusion_detail_Sq, boost::mpl::int_<N> >               \
0152     {                                                                           \
0153         typedef typename boost_fusion_detail_Sq::t##N##_type type;              \
0154     };
0155 
0156 #define BOOST_FUSION_MAKE_AT_SPECS(R, DATA, N, ATTRIBUTE)                       \
0157     template <typename boost_fusion_detail_Sq>                                  \
0158     struct at<boost_fusion_detail_Sq, boost::mpl::int_<N> >                     \
0159     {                                                                           \
0160         typedef typename boost::mpl::if_<                                       \
0161             boost::is_const<boost_fusion_detail_Sq>,                            \
0162             typename boost_fusion_detail_Sq::t##N##_type const&,                \
0163             typename boost_fusion_detail_Sq::t##N##_type&                       \
0164         >::type type;                                                           \
0165                                                                                 \
0166         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                \
0167         static type call(boost_fusion_detail_Sq& sq)                            \
0168         {                                                                       \
0169             return sq. BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE);                    \
0170         }                                                                       \
0171     };
0172 
0173 #define BOOST_FUSION_MAKE_TYPEDEF(R, DATA, N, ATTRIBUTE)                        \
0174     typedef BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) t##N##_type;
0175 
0176 #define BOOST_FUSION_MAKE_DATA_MEMBER(R, DATA, N, ATTRIBUTE)                    \
0177     BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE);
0178 
0179 #ifdef BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
0180 
0181 #define BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTE_SEQ_SIZE)         \
0182         template <typename boost_fusion_detail_Iterator>                        \
0183         struct value_of : boost::fusion::result_of::at_c<                       \
0184                               ref_vec_t,                                        \
0185                               boost_fusion_detail_Iterator::index::value        \
0186                           >                                                     \
0187         {                                                                       \
0188         };
0189 
0190 #define BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ)                \
0191         template <typename boost_fusion_detail_Iterator>                        \
0192         struct deref                                                            \
0193         {                                                                       \
0194             typedef typename boost::remove_const<                               \
0195                 boost_fusion_detail_Iterator                                    \
0196             >::type iterator_raw_type;                                          \
0197                                                                                 \
0198             static const int index = iterator_raw_type::index::value;           \
0199                                                                                 \
0200             typedef typename boost::fusion::result_of::at_c<                    \
0201                 ref_vec_t,                                                      \
0202                 index                                                           \
0203             >::type result_raw_type;                                            \
0204                                                                                 \
0205             typedef typename boost::mpl::if_<                                   \
0206                 boost::is_const<typename iterator_raw_type::sequence_type>,     \
0207                 typename boost::add_const<result_raw_type>::type,               \
0208                 result_raw_type                                                 \
0209             >::type type;                                                       \
0210                                                                                 \
0211             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                            \
0212             static type call(iterator_raw_type const& iter)                     \
0213             {                                                                   \
0214                 return boost::fusion::at_c<index>(iter.ref_vec);                \
0215             }                                                                   \
0216         };
0217 
0218 #define BOOST_FUSION_MAKE_ITERATOR_WKND_FIELD_NAME(R, DATA, N, ATTRIBUTE)       \
0219         BOOST_PP_COMMA_IF(N) seq.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)
0220 
0221 #define BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(ATTRIBUTES_SEQ)     \
0222         , ref_vec(BOOST_PP_SEQ_FOR_EACH_I(                                      \
0223                           BOOST_FUSION_MAKE_ITERATOR_WKND_FIELD_NAME,           \
0224                           ~,                                                    \
0225                           BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)))
0226 
0227 #define BOOST_FUSION_MAKE_ITERATOR_WKND_REF(Z, N, DATA)                         \
0228         BOOST_PP_COMMA_IF(N)                                                    \
0229         typename boost::mpl::if_<                                               \
0230                 boost::is_const<boost_fusion_detail_Seq>,                       \
0231                 typename boost::add_const<                                      \
0232                         typename boost_fusion_detail_Seq::t##N##_type           \
0233                 >::type,                                                        \
0234                 typename boost_fusion_detail_Seq::t##N##_type                   \
0235         >::type&
0236 
0237 #define BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE)          \
0238         typedef boost::fusion::vector<                                          \
0239             BOOST_PP_REPEAT(                                                    \
0240                     ATTRIBUTES_SEQ_SIZE,                                        \
0241                     BOOST_FUSION_MAKE_ITERATOR_WKND_REF,                        \
0242                     ~)                                                          \
0243         > ref_vec_t;                                                            \
0244                                                                                 \
0245         ref_vec_t ref_vec;
0246 
0247 #else
0248 
0249 #define BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTES_SEQ_SIZE)        \
0250         template <typename boost_fusion_detail_T> struct value_of;              \
0251         BOOST_PP_REPEAT(                                                        \
0252             ATTRIBUTES_SEQ_SIZE,                                                \
0253             BOOST_FUSION_MAKE_ITERATOR_VALUE_OF_SPECS,                          \
0254             NAME)
0255 
0256 #define BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ)                \
0257         template <typename boost_fusion_detail_T> struct deref;                 \
0258         BOOST_PP_SEQ_FOR_EACH_I(                                                \
0259             BOOST_FUSION_MAKE_ITERATOR_DEREF_SPECS,                             \
0260             NAME,                                                               \
0261             ATTRIBUTES_SEQ)
0262 
0263 #define BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(ATTRIBUTES_SEQ)
0264 
0265 #define BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE)
0266 
0267 #endif  // BOOST_FUSION_NEED_NESTED_TEMPLATE_PARTIAL_SPEC_WKND
0268 
0269 // Note: We can't nest the iterator inside the struct because we run into
0270 //       a MSVC10 bug involving partial specializations of nested templates.
0271 
0272 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_IMPL(NAME, ATTRIBUTES)                \
0273     BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES)                \
0274     struct NAME : boost::fusion::sequence_facade<                               \
0275                       NAME,                                                     \
0276                       boost::fusion::random_access_traversal_tag                \
0277                   >                                                             \
0278     {                                                                           \
0279         BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES)             \
0280     };
0281 
0282 #define BOOST_FUSION_DEFINE_TPL_STRUCT_INLINE_IMPL(                             \
0283     TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES)                                      \
0284                                                                                 \
0285     BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES)                \
0286                                                                                 \
0287     template <                                                                  \
0288         BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL(                  \
0289             (0)TEMPLATE_PARAMS_SEQ)                                             \
0290     >                                                                           \
0291     struct NAME : boost::fusion::sequence_facade<                               \
0292                       NAME<                                                     \
0293                           BOOST_PP_SEQ_ENUM(TEMPLATE_PARAMS_SEQ)                \
0294                       >,                                                        \
0295                       boost::fusion::random_access_traversal_tag                \
0296                   >                                                             \
0297     {                                                                           \
0298         BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES)             \
0299     };
0300 
0301 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES)             \
0302     BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL(                                    \
0303         NAME,                                                                   \
0304         BOOST_PP_CAT(BOOST_FUSION_DEFINE_STRUCT_FILLER_0 ATTRIBUTES,_END))
0305 
0306 // Note: can't compute BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ) directly because
0307 //       ATTRIBUTES_SEQ may be empty and calling BOOST_PP_SEQ_SIZE on an empty
0308 //       sequence produces warnings on MSVC.
0309 #define BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL(NAME, ATTRIBUTES_SEQ)           \
0310     BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL(                        \
0311         NAME,                                                                   \
0312         ATTRIBUTES_SEQ,                                                         \
0313         BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ)))
0314 
0315 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES)            \
0316     BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL(                                   \
0317         NAME,                                                                   \
0318         BOOST_PP_CAT(BOOST_FUSION_DEFINE_STRUCT_FILLER_0 ATTRIBUTES,_END))
0319 
0320 #define BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL(NAME, ATTRIBUTES_SEQ)          \
0321     BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL(                       \
0322         NAME,                                                                   \
0323         ATTRIBUTES_SEQ,                                                         \
0324         BOOST_PP_DEC(BOOST_PP_SEQ_SIZE((0)ATTRIBUTES_SEQ)))
0325 
0326 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL(                   \
0327     NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE)                                  \
0328                                                                                 \
0329     BOOST_FUSION_PUSH_WARNINGS                                                  \
0330     BOOST_FUSION_DISABLE_MSVC_WARNING(4512)                                     \
0331                                                                                 \
0332     template <typename boost_fusion_detail_Seq, int N>                          \
0333     struct BOOST_FUSION_ITERATOR_NAME(NAME)                                     \
0334         : boost::fusion::iterator_facade<                                       \
0335               BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Seq, N>,     \
0336               boost::fusion::random_access_traversal_tag                        \
0337           >                                                                     \
0338     {                                                                           \
0339         typedef boost::mpl::int_<N> index;                                      \
0340         typedef boost_fusion_detail_Seq sequence_type;                          \
0341                                                                                 \
0342         BOOST_FUSION_GPU_ENABLED                                                \
0343         BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq)          \
0344             : seq_(seq)                                                         \
0345               BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES(              \
0346                       (0)ATTRIBUTES_SEQ)                                        \
0347         {}                                                                      \
0348                                                                                 \
0349         boost_fusion_detail_Seq& seq_;                                          \
0350                                                                                 \
0351         BOOST_FUSION_DEFINE_ITERATOR_WKND_MEMBERS(ATTRIBUTES_SEQ_SIZE)          \
0352                                                                                 \
0353         BOOST_FUSION_DEFINE_ITERATOR_VALUE_OF(NAME, ATTRIBUTES_SEQ_SIZE)        \
0354                                                                                 \
0355         BOOST_FUSION_DEFINE_ITERATOR_DEREF(NAME, ATTRIBUTES_SEQ)                \
0356                                                                                 \
0357         template <typename boost_fusion_detail_It>                              \
0358         struct next                                                             \
0359         {                                                                       \
0360             typedef BOOST_FUSION_ITERATOR_NAME(NAME)<                           \
0361                 typename boost_fusion_detail_It::sequence_type,                 \
0362                 boost_fusion_detail_It::index::value + 1                        \
0363             > type;                                                             \
0364                                                                                 \
0365             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                            \
0366             static type call(boost_fusion_detail_It const& it)                  \
0367             {                                                                   \
0368                 return type(it.seq_);                                           \
0369             }                                                                   \
0370         };                                                                      \
0371                                                                                 \
0372         template <typename boost_fusion_detail_It>                              \
0373         struct prior                                                            \
0374         {                                                                       \
0375             typedef BOOST_FUSION_ITERATOR_NAME(NAME)<                           \
0376                 typename boost_fusion_detail_It::sequence_type,                 \
0377                 boost_fusion_detail_It::index::value - 1                        \
0378             > type;                                                             \
0379                                                                                 \
0380             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                            \
0381             static type call(boost_fusion_detail_It const& it)                  \
0382             {                                                                   \
0383                 return type(it.seq_);                                           \
0384             }                                                                   \
0385         };                                                                      \
0386                                                                                 \
0387         template <                                                              \
0388             typename boost_fusion_detail_It1,                                   \
0389             typename boost_fusion_detail_It2                                    \
0390         >                                                                       \
0391         struct distance                                                         \
0392         {                                                                       \
0393             typedef typename boost::mpl::minus<                                 \
0394                 typename boost_fusion_detail_It2::index,                        \
0395                 typename boost_fusion_detail_It1::index                         \
0396             >::type type;                                                       \
0397                                                                                 \
0398             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                            \
0399             static type call(boost_fusion_detail_It1 const& /* it1 */,          \
0400                              boost_fusion_detail_It2 const& /* it2 */)          \
0401             {                                                                   \
0402                 return type();                                                  \
0403             }                                                                   \
0404         };                                                                      \
0405                                                                                 \
0406         template <                                                              \
0407             typename boost_fusion_detail_It,                                    \
0408             typename boost_fusion_detail_M                                      \
0409         >                                                                       \
0410         struct advance                                                          \
0411         {                                                                       \
0412             typedef BOOST_FUSION_ITERATOR_NAME(NAME)<                           \
0413                 typename boost_fusion_detail_It::sequence_type,                 \
0414                 boost_fusion_detail_It::index::value                            \
0415                     + boost_fusion_detail_M::value                              \
0416             > type;                                                             \
0417                                                                                 \
0418             BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                            \
0419             static type call(boost_fusion_detail_It const& it)                  \
0420             {                                                                   \
0421                 return type(it.seq_);                                           \
0422             }                                                                   \
0423         };                                                                      \
0424     };                                                                          \
0425                                                                                 \
0426     BOOST_FUSION_POP_WARNINGS                                                   \
0427     /**/
0428 
0429 
0430 #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL(                    \
0431     NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE)                                  \
0432                                                                                 \
0433     NAME()                                                                      \
0434         BOOST_PP_IF(ATTRIBUTES_SEQ_SIZE,                                        \
0435             BOOST_FUSION_MAKE_DEFAULT_INIT_LIST,                                \
0436             BOOST_PP_EMPTY)(ATTRIBUTES_SEQ)                                     \
0437     {                                                                           \
0438     }                                                                           \
0439                                                                                 \
0440     BOOST_PP_IF(                                                                \
0441         ATTRIBUTES_SEQ_SIZE,                                                    \
0442         BOOST_FUSION_MAKE_COPY_CONSTRUCTOR,                                     \
0443         BOOST_FUSION_IGNORE_2)                                                  \
0444             (NAME, ATTRIBUTES_SEQ)                                              \
0445                                                                                 \
0446     template <typename boost_fusion_detail_Seq>                                 \
0447     BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED                              \
0448     NAME(const boost_fusion_detail_Seq& rhs)                                    \
0449     {                                                                           \
0450         boost::fusion::copy(rhs, *this);                                        \
0451     }                                                                           \
0452                                                                                 \
0453     template <typename boost_fusion_detail_Seq>                                 \
0454     BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED                              \
0455     NAME& operator=(const boost_fusion_detail_Seq& rhs)                         \
0456     {                                                                           \
0457         boost::fusion::copy(rhs, *this);                                        \
0458         return *this;                                                           \
0459     }                                                                           \
0460                                                                                 \
0461     template <typename boost_fusion_detail_Sq>                                  \
0462     struct begin                                                                \
0463     {                                                                           \
0464         typedef BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, 0>     \
0465              type;                                                              \
0466                                                                                 \
0467         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                \
0468         static type call(boost_fusion_detail_Sq& sq)                            \
0469         {                                                                       \
0470             return type(sq);                                                    \
0471         }                                                                       \
0472     };                                                                          \
0473                                                                                 \
0474     template <typename boost_fusion_detail_Sq>                                  \
0475     struct end                                                                  \
0476     {                                                                           \
0477         typedef BOOST_FUSION_ITERATOR_NAME(NAME)<                               \
0478             boost_fusion_detail_Sq,                                             \
0479             ATTRIBUTES_SEQ_SIZE                                                 \
0480         > type;                                                                 \
0481                                                                                 \
0482         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED                                \
0483         static type call(boost_fusion_detail_Sq& sq)                            \
0484         {                                                                       \
0485             return type(sq);                                                    \
0486         }                                                                       \
0487     };                                                                          \
0488                                                                                 \
0489     template <typename boost_fusion_detail_Sq>                                  \
0490     struct size : boost::mpl::int_<ATTRIBUTES_SEQ_SIZE>                         \
0491     {                                                                           \
0492     };                                                                          \
0493                                                                                 \
0494     template <typename boost_fusion_detail_Sq>                                  \
0495     struct empty : boost::mpl::bool_<ATTRIBUTES_SEQ_SIZE == 0>                  \
0496     {                                                                           \
0497     };                                                                          \
0498                                                                                 \
0499     template <                                                                  \
0500         typename boost_fusion_detail_Sq,                                        \
0501         typename boost_fusion_detail_N                                          \
0502     >                                                                           \
0503     struct value_at : value_at<                                                 \
0504                           boost_fusion_detail_Sq,                               \
0505                           boost::mpl::int_<boost_fusion_detail_N::value>        \
0506                       >                                                         \
0507     {                                                                           \
0508     };                                                                          \
0509                                                                                 \
0510     BOOST_PP_REPEAT(                                                            \
0511         ATTRIBUTES_SEQ_SIZE,                                                    \
0512         BOOST_FUSION_MAKE_VALUE_AT_SPECS,                                       \
0513         ~)                                                                      \
0514                                                                                 \
0515     template <                                                                  \
0516         typename boost_fusion_detail_Sq,                                        \
0517         typename boost_fusion_detail_N                                          \
0518     >                                                                           \
0519     struct at : at<                                                             \
0520                     boost_fusion_detail_Sq,                                     \
0521                     boost::mpl::int_<boost_fusion_detail_N::value>              \
0522                 >                                                               \
0523     {                                                                           \
0524     };                                                                          \
0525                                                                                 \
0526     BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_MAKE_AT_SPECS, ~, ATTRIBUTES_SEQ)      \
0527                                                                                 \
0528     BOOST_PP_SEQ_FOR_EACH_I(BOOST_FUSION_MAKE_TYPEDEF, ~, ATTRIBUTES_SEQ)       \
0529                                                                                 \
0530     BOOST_PP_SEQ_FOR_EACH_I(                                                    \
0531         BOOST_FUSION_MAKE_DATA_MEMBER,                                          \
0532         ~,                                                                      \
0533         ATTRIBUTES_SEQ)
0534 
0535 #endif