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

📄 container.hpp

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 HPP
📖 第 1 页 / 共 2 页
字号:
            //         void M::insert(Iter first, Iter last);            template <                typename C              , typename Arg1              , typename Arg2 = fusion::void_              , typename Arg3 = fusion::void_            >            class result            {                struct pair_iterator_bool                {                    typedef typename std::pair<typename C::iterator, bool> type;                };                typedef                    boost::mpl::eval_if<                        map_insert_returns_pair<C>                      , pair_iterator_bool                      , iterator_of<C>                    >                choice_1;                typedef                    boost::mpl::eval_if<                        boost::mpl::and_<                            boost::is_same<Arg3, fusion::void_>                          , boost::mpl::not_<boost::is_same<Arg1, Arg2> > >                      , iterator_of<C>                      , boost::mpl::identity<void>                    >                choice_2;            public:                typedef typename                    boost::mpl::eval_if<                        boost::is_same<Arg2, fusion::void_>                      , choice_1                      , choice_2                    >::type                type;            };            template <typename C, typename Arg1>            typename result<C, Arg1>::type            operator()(C& c, Arg1 const& arg1) const            {                return c.insert(arg1);            }            template <typename C, typename Arg1, typename Arg2>            typename result<C, Arg1, Arg2>::type            operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const            {                return c.insert(arg1, arg2);            }            template <typename C, typename Arg1, typename Arg2, typename Arg3>            typename result<C, Arg1, Arg2, Arg3>::type            operator()(                C& c, Arg1 const& arg1, Arg2 const& arg2, Arg3 const& arg3) const            {                return c.insert(arg1, arg2, arg3);            }        };        struct key_comp        {            template <typename C>            struct result            {                typedef typename key_compare_of<C>::type type;            };            template <typename C>            typename result<C>::type            operator()(C const& c) const            {                return c.key_comp();            }        };        struct max_size        {            template <typename C>            struct result            {                typedef typename size_type_of<C>::type type;            };            template <typename C>            typename result<C>::type            operator()(C const& c) const            {                return c.max_size();            }        };        struct pop_back        {            template <typename C>            struct result            {                typedef void type;            };            template <typename C>            void operator()(C& c) const            {                return c.pop_back();            }        };        struct pop_front        {            template <typename C>            struct result            {                typedef void type;            };            template <typename C>            void operator()(C& c) const            {                return c.pop_front();            }        };        struct push_back        {            template <typename C, typename Arg>            struct result            {                typedef void type;            };            template <typename C, typename Arg>            void operator()(C& c, Arg const& data) const            {                return c.push_back(data);            }        };        struct push_front        {            template <typename C, typename Arg>            struct result            {                typedef void type;            };            template <typename C, typename Arg>            void operator()(C& c, Arg const& data) const            {                return c.push_front(data);            }        };        struct rbegin        {            template <typename C>            struct result            {                typedef typename                    const_qualified_reverse_iterator_of<C>::type                type;            };            template <typename C>            typename result<C>::type            operator()(C& c) const            {                return c.rbegin();            }        };        struct rend        {            template <typename C>            struct result            {                typedef typename                    const_qualified_reverse_iterator_of<C>::type                type;            };            template <typename C>            typename result<C>::type            operator()(C& c) const            {                return c.rend();            }        };        struct reserve        {            template <typename C, typename Arg>            struct result            {                typedef void type;            };            template <typename C, typename Arg>            void operator()(C& c, Arg const& count) const            {                return c.reserve(count);            }        };        struct resize        {            template <typename C, typename Arg1, typename Arg2 = fusion::void_>            struct result            {                typedef void type;            };            template <typename C, typename Arg1>            void operator()(C& c, Arg1 const& arg1) const            {                return c.resize(arg1);            }            template <typename C, typename Arg1, typename Arg2>            void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const            {                return c.resize(arg1, arg2);            }        };        struct size        {            template <typename C>            struct result            {                typedef typename size_type_of<C>::type type;            };            template <typename C>            typename result<C>::type            operator()(C const& c) const            {                return c.size();            }        };    struct splice    {        template <            typename C          , typename Arg1          , typename Arg2          , typename Arg3 = fusion::void_          , typename Arg4 = fusion::void_        >        struct result        {            typedef void type;        };        template <typename C, typename Arg1, typename Arg2>        void operator()(C& c, Arg1 const& arg1, Arg2& arg2) const        {            c.splice(arg1, arg2);        }        template <            typename C          , typename Arg1          , typename Arg2          , typename Arg3        >        void operator()(            C& c          , Arg1 const& arg1          , Arg2& arg2          , Arg3 const& arg3        ) const        {            c.splice(arg1, arg2, arg3);        }        template <            typename C          , typename Arg1          , typename Arg2          , typename Arg3          , typename Arg4        >        void operator()(            C& c          , Arg1 const& arg1          , Arg2& arg2          , Arg3 const& arg3          , Arg4 const& arg4        ) const        {            c.splice(arg1, arg2, arg3, arg4);        }    };    struct value_comp    {        template <typename C>        struct result        {            typedef typename value_compare_of<C>::type type;        };        template <typename C>        typename result<C>::type        operator()(C const& c) const        {            return c.value_comp();        }    };} // namespace stl///////////////////////////////////////////////////////////////////////////////////  The lazy functions themselves./////////////////////////////////////////////////////////////////////////////////function<stl::assign> const         assign = stl::assign();function<stl::at> const             at = stl::at();function<stl::back> const           back = stl::back();function<stl::begin> const          begin = stl::begin();function<stl::capacity> const       capacity = stl::capacity();function<stl::clear> const          clear = stl::clear();function<stl::empty> const          empty = stl::empty();function<stl::end> const            end = stl::end();function<stl::erase> const          erase = stl::erase();function<stl::front> const          front = stl::front();function<stl::get_allocator> const  get_allocator = stl::get_allocator();function<stl::insert> const         insert = stl::insert();function<stl::key_comp> const       key_comp = stl::key_comp();function<stl::max_size> const       max_size = stl::max_size();function<stl::pop_back> const       pop_back  = stl::pop_back();function<stl::pop_front> const      pop_front = stl::pop_front();function<stl::push_back> const      push_back  = stl::push_back();function<stl::push_front> const     push_front = stl::push_front();function<stl::rbegin> const         rbegin = stl::rbegin();function<stl::rend> const           rend = stl::rend();function<stl::reserve> const        reserve = stl::reserve();function<stl::resize> const         resize = stl::resize();function<stl::size> const           size = stl::size();function<stl::splice> const         splice = stl::splice();function<stl::value_comp> const     value_comp = stl::value_comp();}} // namespace boost::phoenix#endif // PHOENIX_STL_CONTAINERS_HPP

⌨️ 快捷键说明

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