📄 operator.h
字号:
// -*- c++ -*-/* Do not edit! -- generated file */#ifndef _SIGC_LAMBDA_OPERATOR_HPP_#define _SIGC_LAMBDA_OPERATOR_HPP_#include <sigc++/adaptors/lambda/base.h>namespace sigc {/** Deduces the base type of a reference or a pointer. * @ingroup internal */template <class T_type>struct dereference_trait { typedef void type; };template <class T_type>struct dereference_trait<T_type*> { typedef T_type type; };template <class T_type>struct dereference_trait<const T_type*> { typedef const T_type type; };template <class T_type>struct dereference_trait<T_type*&> { typedef T_type type; };template <class T_type>struct dereference_trait<const T_type*&> { typedef const T_type type; };template <class T_type>struct dereference_trait<T_type* const&> { typedef T_type type; };template <class T_type>struct dereference_trait<const T_type* const&> { typedef const T_type type; };template <class T_type>struct arithmetic {};template <class T_type>struct bitwise {};template <class T_type>struct logical {};template <class T_type>struct relational {};template <class T_type>struct arithmetic_assign {};template <class T_type>struct bitwise_assign {};template <class T_type>struct other {};template <class T_type>struct unary_arithmetic {};template <class T_type>struct unary_bitwise {};template <class T_type>struct unary_logical {};template <class T_type>struct unary_other {};template <class T_type>struct cast_ {};struct plus {};struct minus {};struct multiplies {};struct divides {};struct modulus {};struct leftshift {};struct rightshift {};struct and_ {};struct or_ {};struct xor_ {};struct less {};struct greater {};struct less_equal {};struct greater_equal {};struct equal_to {};struct not_equal_to {};struct subscript {};struct assign {};struct pre_increment {};struct pre_decrement {};struct negate {};struct not_ {};struct address {};struct dereference {};struct reinterpret_ {};struct static_ {};struct dynamic_ {};template <class T_action, class T_test1, class T_test2>struct lambda_action_deduce_result_type { typedef typename type_trait<T_test1>::type type; }; // TODO: e.g. T_test1=int, T_test2=double yields int but it should yield double !template <class T_action, class T_test1, class T_test2>struct lambda_action_deduce_result_type<logical<T_action>, T_test1, T_test2> { typedef bool type; };template <class T_action, class T_test1, class T_test2>struct lambda_action_deduce_result_type<relational<T_action>, T_test1, T_test2> { typedef bool type; };template <class T_action, class T_test1, class T_test2>struct lambda_action_deduce_result_type<arithmetic_assign<T_action>, T_test1, T_test2> { typedef T_test1 type; };template <class T_action, class T_test1, class T_test2>struct lambda_action_deduce_result_type<bitwise_assign<T_action>, T_test1, T_test2> { typedef T_test1 type; };template <class T_test1, class T_test2>struct lambda_action_deduce_result_type<other<subscript>, T_test1, T_test2> { typedef typename type_trait<typename dereference_trait<T_test1>::type>::pass type; };template <class T_action, class T_test>struct lambda_action_unary_deduce_result_type { typedef typename type_trait<T_test>::type type; };template <class T_action, class T_type, class T_test>struct lambda_action_convert_deduce_result_type { typedef typename type_trait<T_type>::type type; };template <class T_action, class T_test>struct lambda_action_unary_deduce_result_type<unary_logical<T_action>, T_test> { typedef bool type; };template <class T_test>struct lambda_action_unary_deduce_result_type<unary_other<address>, T_test> { typedef typename type_trait<T_test>::pointer type; };template <class T_test>struct lambda_action_unary_deduce_result_type<unary_other<dereference>, T_test> { typedef typename type_trait<typename dereference_trait<T_test>::type>::pass type; };template <class T_action>struct lambda_action {};template <class T_action>struct lambda_action_unary {};template <class T_action, class T_type>struct lambda_action_convert {};template <>struct lambda_action<arithmetic<plus> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<arithmetic<plus>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 + _A_2; }};template <>struct lambda_action<arithmetic<minus> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<arithmetic<minus>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 - _A_2; }};template <>struct lambda_action<arithmetic<multiplies> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<arithmetic<multiplies>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 * _A_2; }};template <>struct lambda_action<arithmetic<divides> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<arithmetic<divides>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 / _A_2; }};template <>struct lambda_action<arithmetic<modulus> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<arithmetic<modulus>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 % _A_2; }};template <>struct lambda_action<bitwise<leftshift> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<bitwise<leftshift>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 << _A_2; }};template <>struct lambda_action<bitwise<rightshift> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<bitwise<rightshift>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 >> _A_2; }};template <>struct lambda_action<bitwise<and_> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<bitwise<and_>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 & _A_2; }};template <>struct lambda_action<bitwise<or_> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<bitwise<or_>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 | _A_2; }};template <>struct lambda_action<bitwise<xor_> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<bitwise<xor_>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 ^ _A_2; }};template <>struct lambda_action<logical<and_> >{ template <class T_arg1, class T_arg2> static typename lambda_action_deduce_result_type<logical<and_>, T_arg1, T_arg2>::type do_action(T_arg1 _A_1, T_arg2 _A_2) { return _A_1 && _A_2; }};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -