operators.hpp
来自「CGAL is a collaborative effort of severa」· HPP 代码 · 共 2,105 行 · 第 1/5 页
HPP
2,105 行
{ return unary_operator<invert_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<invert_op, BaseT>::typeoperator~(actor<BaseT> const& _0){ return impl::make_unary<invert_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// reference lazy operator (prefix &)/////////////////////////////////////////////////////////////////////////////////struct reference_op { template <typename T0> struct result { typedef typename unary_operator<reference_op, T0>::result_type type; }; template <typename T0> typename unary_operator<reference_op, T0>::result_type operator()(T0& _0) const { return unary_operator<reference_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<reference_op, BaseT>::typeoperator&(actor<BaseT> const& _0){ return impl::make_unary<reference_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// dereference lazy operator (prefix *)/////////////////////////////////////////////////////////////////////////////////struct dereference_op { template <typename T0> struct result { typedef typename unary_operator<dereference_op, T0>::result_type type; }; template <typename T0> typename unary_operator<dereference_op, T0>::result_type operator()(T0& _0) const { return unary_operator<dereference_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<dereference_op, BaseT>::typeoperator*(actor<BaseT> const& _0){ return impl::make_unary<dereference_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// pre increment lazy operator (prefix ++)/////////////////////////////////////////////////////////////////////////////////struct pre_incr_op { template <typename T0> struct result { typedef typename unary_operator<pre_incr_op, T0>::result_type type; }; template <typename T0> typename unary_operator<pre_incr_op, T0>::result_type operator()(T0& _0) const { return unary_operator<pre_incr_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<pre_incr_op, BaseT>::typeoperator++(actor<BaseT> const& _0){ return impl::make_unary<pre_incr_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// pre decrement lazy operator (prefix --)/////////////////////////////////////////////////////////////////////////////////struct pre_decr_op { template <typename T0> struct result { typedef typename unary_operator<pre_decr_op, T0>::result_type type; }; template <typename T0> typename unary_operator<pre_decr_op, T0>::result_type operator()(T0& _0) const { return unary_operator<pre_decr_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<pre_decr_op, BaseT>::typeoperator--(actor<BaseT> const& _0){ return impl::make_unary<pre_decr_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// post increment lazy operator (postfix ++)/////////////////////////////////////////////////////////////////////////////////struct post_incr_op { template <typename T0> struct result { typedef typename unary_operator<post_incr_op, T0>::result_type type; }; template <typename T0> typename unary_operator<post_incr_op, T0>::result_type operator()(T0& _0) const { return unary_operator<post_incr_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<post_incr_op, BaseT>::typeoperator++(actor<BaseT> const& _0, int){ return impl::make_unary<post_incr_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// post decrement lazy operator (postfix --)/////////////////////////////////////////////////////////////////////////////////struct post_decr_op { template <typename T0> struct result { typedef typename unary_operator<post_decr_op, T0>::result_type type; }; template <typename T0> typename unary_operator<post_decr_op, T0>::result_type operator()(T0& _0) const { return unary_operator<post_decr_op, T0>::eval(_0); }};//////////////////////////////////template <typename BaseT>inline typename impl::make_unary<post_decr_op, BaseT>::typeoperator--(actor<BaseT> const& _0, int){ return impl::make_unary<post_decr_op, BaseT>::construct(_0);}/////////////////////////////////////////////////////////////////////////////////// assignment lazy operator (infix =)// The acual lazy operator is a member of the actor class./////////////////////////////////////////////////////////////////////////////////struct assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT>template <typename B>inline typename impl::make_binary1<assign_op, BaseT, B>::typeactor<BaseT>::operator=(B const& _1) const{ return impl::make_binary1<assign_op, BaseT, B>::construct(*this, _1);}/////////////////////////////////////////////////////////////////////////////////// index lazy operator (array index [])// The acual lazy operator is a member of the actor class./////////////////////////////////////////////////////////////////////////////////struct index_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<index_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<index_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<index_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT>template <typename B>inline typename impl::make_binary1<index_op, BaseT, B>::typeactor<BaseT>::operator[](B const& _1) const{ return impl::make_binary1<index_op, BaseT, B>::construct(*this, _1);}/////////////////////////////////////////////////////////////////////////////////// plus assign lazy operator (infix +=)/////////////////////////////////////////////////////////////////////////////////struct plus_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<plus_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<plus_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<plus_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<plus_assign_op, BaseT, T1>::typeoperator+=(actor<BaseT> const& _0, T1 CREF _1){ return impl::make_binary1<plus_assign_op, BaseT, T1>::construct(_0, _1);}/////////////////////////////////////////////////////////////////////////////////// minus assign lazy operator (infix -=)/////////////////////////////////////////////////////////////////////////////////struct minus_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<minus_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<minus_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<minus_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<minus_assign_op, BaseT, T1>::typeoperator-=(actor<BaseT> const& _0, T1 CREF _1){ return impl::make_binary1<minus_assign_op, BaseT, T1>::construct(_0, _1);}/////////////////////////////////////////////////////////////////////////////////// times assign lazy operator (infix *=)/////////////////////////////////////////////////////////////////////////////////struct times_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<times_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<times_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<times_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<times_assign_op, BaseT, T1>::typeoperator*=(actor<BaseT> const& _0, T1 CREF _1){ return impl::make_binary1<times_assign_op, BaseT, T1>::construct(_0, _1);}/////////////////////////////////////////////////////////////////////////////////// divide assign lazy operator (infix /=)/////////////////////////////////////////////////////////////////////////////////struct divide_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<divide_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<divide_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<divide_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<divide_assign_op, BaseT, T1>::typeoperator/=(actor<BaseT> const& _0, T1 CREF _1){ return impl::make_binary1<divide_assign_op, BaseT, T1>::construct(_0, _1);}/////////////////////////////////////////////////////////////////////////////////// mod assign lazy operator (infix %=)/////////////////////////////////////////////////////////////////////////////////struct mod_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<mod_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<mod_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<mod_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<mod_assign_op, BaseT, T1>::typeoperator%=(actor<BaseT> const& _0, T1 CREF _1){ return impl::make_binary1<mod_assign_op, BaseT, T1>::construct(_0, _1);}/////////////////////////////////////////////////////////////////////////////////// and assign lazy operator (infix &=)/////////////////////////////////////////////////////////////////////////////////struct and_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<and_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<and_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<and_assign_op, T0, T1>::eval(_0, _1); }};//////////////////////////////////template <typename BaseT, typename T1>inline typename impl::make_binary1<and_assign_op, BaseT, T1>::typeoperator&=(actor<BaseT> const& _0, T1 CREF _1){ return impl::make_binary1<and_assign_op, BaseT, T1>::construct(_0, _1);}/////////////////////////////////////////////////////////////////////////////////// or assign lazy operator (infix |=)/////////////////////////////////////////////////////////////////////////////////struct or_assign_op { template <typename T0, typename T1> struct result { typedef typename binary_operator<or_assign_op, T0, T1> ::result_type type; }; template <typename T0, typename T1> typename binary_operator<or_assign_op, T0, T1>::result_type operator()(T0& _0, T1& _1) const { return binary_operator<or_assign_op, T0, T1>::eval(_0, _1); }};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?