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

📄 transform_view_iterator.hpp

📁 C++的一个好库。。。现在很流行
💻 HPP
字号:
/*=============================================================================
    Copyright (c) 2003 Joel de Guzman
    Copyright (c) 2004 Peder Holt

    Use, modification and distribution is subject to the Boost Software
    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
    http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ITERATOR_TRANSFORM_VIEW_ITERATOR_HPP)
#define FUSION_ITERATOR_TRANSFORM_VIEW_ITERATOR_HPP

#include <boost/spirit/fusion/iterator/as_fusion_iterator.hpp>
#include <boost/spirit/fusion/iterator/detail/iterator_base.hpp>
#include <boost/spirit/fusion/iterator/detail/transform_view_iterator/deref_traits.hpp>
#include <boost/spirit/fusion/iterator/detail/transform_view_iterator/next_traits.hpp>
#include <boost/spirit/fusion/iterator/detail/transform_view_iterator/value_traits.hpp>

namespace boost { namespace fusion
{
    struct transform_view_iterator_tag;

    template <typename First, typename F>
    struct transform_view_iterator
        : iterator_base<transform_view_iterator<First, F> >
    {
        typedef transform_view_iterator_tag tag;
        typedef as_fusion_iterator<First> converter;
        typedef typename converter::type first_type;
        typedef F transform_type;

        transform_view_iterator(First const& first, F f);

        first_type first;
        transform_type f;
    };

    template <typename First, typename F>
    transform_view_iterator<First,F>::transform_view_iterator(First const& first, F f)
    : first(converter::convert(first)), f(f) {}

}}

#endif

⌨️ 快捷键说明

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