⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fusion.hpp

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 HPP
📖 第 1 页 / 共 2 页
字号:
            >            struct apply            {                typedef Value type;            };            template<typename Iterator, typename Expr>            struct apply<Iterator, proto::ref_<Expr> >            {                typedef Expr &type;            };        };        #if BOOST_VERSION < 103500        template<typename Tag>        struct value_impl;        template<>        struct value_impl<proto::tag::proto_expr_iterator>          : value_of_impl<proto::tag::proto_expr_iterator>        {};        #endif        template<typename Tag>        struct deref_impl;        template<>        struct deref_impl<proto::tag::proto_expr_iterator>        {            template<typename Iterator>            struct apply            {                typedef                    typename proto::result_of::arg_c<                        typename Iterator::expr_type const                      , Iterator::index                    >::type const &                type;                static type call(Iterator const &iter)                {                    return proto::arg_c<Iterator::index>(iter.expr);                }            };        };        template<typename Tag>        struct advance_impl;        template<>        struct advance_impl<proto::tag::proto_expr_iterator>        {            template<typename Iterator, typename N>            struct apply            {                typedef                    typename proto::detail::expr_iterator<                        typename Iterator::expr_type                      , Iterator::index + N::value                    >                type;                static type call(Iterator const &iter)                {                    return type(iter.expr);                }            };        };        template<typename Tag>        struct distance_impl;        template<>        struct distance_impl<proto::tag::proto_expr_iterator>        {            template<typename IteratorFrom, typename IteratorTo>            struct apply              : mpl::long_<IteratorTo::index - IteratorFrom::index>            {};        };        template<typename Tag>        struct next_impl;        template<>        struct next_impl<proto::tag::proto_expr_iterator>        {            template<typename Iterator>            struct apply              : advance_impl<proto::tag::proto_expr_iterator>::template apply<Iterator, mpl::long_<1> >            {};        };        template<typename Tag>        struct prior_impl;        template<>        struct prior_impl<proto::tag::proto_expr_iterator>        {            template<typename Iterator>            struct apply              : advance_impl<proto::tag::proto_expr_iterator>::template apply<Iterator, mpl::long_<-1> >            {};        };        #if BOOST_VERSION >= 103500        template<typename Tag>        struct category_of_impl;        template<>        struct category_of_impl<proto::tag::proto_expr>        {            template<typename Sequence>            struct apply            {                typedef random_access_traversal_tag type;            };        };        #endif        template<typename Tag>        struct size_impl;        template<>        struct size_impl<proto::tag::proto_expr>        {            template<typename Sequence>            struct apply              : mpl::long_<0 == Sequence::proto_arity::value ? 1 : Sequence::proto_arity::value>            {};        };        template<typename Tag>        struct begin_impl;        template<>        struct begin_impl<proto::tag::proto_expr>        {            template<typename Sequence>            struct apply            {                typedef proto::detail::expr_iterator<Sequence, 0> type;                static type call(Sequence const &seq)                {                    return type(seq);                }            };        };        template<typename Tag>        struct end_impl;        template<>        struct end_impl<proto::tag::proto_expr>        {            template<typename Sequence>            struct apply            {                typedef                    proto::detail::expr_iterator<                        Sequence                      , 0 == Sequence::proto_arity::value ? 1 : Sequence::proto_arity::value                    >                type;                static type call(Sequence const &seq)                {                    return type(seq);                }            };        };        template<typename Tag>        struct value_at_impl;        template<>        struct value_at_impl<proto::tag::proto_expr>        {            template<                typename Sequence              , typename Index              , typename Value = typename proto::result_of::arg_c<                    Sequence                  , Index::value                >::wrapped_type            >            struct apply            {                typedef Value type;            };            template<typename Sequence, typename Index, typename Expr>            struct apply<Sequence, Index, proto::ref_<Expr> >            {                typedef Expr &type;            };            template<typename Sequence, typename Index, typename Expr>            struct apply<Sequence, Index, Expr &>            {                typedef Expr &type;            };        };        template<typename Tag>        struct at_impl;        template<>        struct at_impl<proto::tag::proto_expr>        {            template<typename Sequence, typename Index>            struct apply            {                typedef                    typename proto::result_of::arg_c<                        Sequence                      , Index::value                    >::reference                type;                static type call(Sequence &seq)                {                    return proto::arg_c<Index::value>(seq);                }            };            template<typename Sequence, typename Index>            struct apply<Sequence const, Index>            {                typedef                    typename proto::result_of::arg_c<                        Sequence                      , Index::value                    >::const_reference                type;                static type call(Sequence const &seq)                {                    return proto::arg_c<Index::value>(seq);                }            };        };        #if BOOST_VERSION >= 103500        template<typename Tag>        struct is_segmented_impl;        template<>        struct is_segmented_impl<proto::tag::proto_flat_view>        {            template<typename Iterator>            struct apply              : mpl::true_            {};        };        template<typename Tag>        struct segments_impl;        template<>        struct segments_impl<proto::tag::proto_flat_view>        {            template<typename Sequence>            struct apply            {                typedef typename Sequence::proto_tag proto_tag;                typedef fusion::transform_view<                    typename Sequence::expr_type                  , proto::detail::as_element<proto_tag>                > type;                static type call(Sequence &sequence)                {                    return type(sequence.expr_, proto::detail::as_element<proto_tag>());                }            };        };        template<>        struct category_of_impl<proto::tag::proto_flat_view>        {            template<typename Sequence>            struct apply            {                typedef forward_traversal_tag type;            };        };        template<>        struct begin_impl<proto::tag::proto_flat_view>        {            template<typename Sequence>            struct apply              : fusion::segmented_begin<Sequence>            {};        };        template<>        struct end_impl<proto::tag::proto_flat_view>        {            template<typename Sequence>            struct apply              : fusion::segmented_end<Sequence>            {};        };        template<>        struct size_impl<proto::tag::proto_flat_view>        {            template<typename Sequence>            struct apply              : fusion::segmented_size<Sequence>            {};        };        #endif    }}}#endif // BOOST_PROTO_DOXYGEN_INVOKED#undef UNREF#if BOOST_MSVC#pragma warning(pop)#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -