boolean_binary.h

来自「高效的c++科学算法库」· C头文件 代码 · 共 139 行

H
139
字号
// ------------------------------------------------------- -*- c++ -*- --//// WARNING: FILE AUTOMATICALLY GENERATED WITH boolean_binary.sed//// ----------------------------------------------------------------------// from:  boolean_binary.hxx// ----------------------------------------------------------------------// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpEqual// operator = ==// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpEqual {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a == b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpNotEqual// operator = !=// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpNotEqual {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a != b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpGreater// operator = >// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpGreater {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a > b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpLess// operator = <// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpLess {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a < b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpGreaterOrEqual// operator = >=// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpGreaterOrEqual {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a >= b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpLessOrEqual// operator = <=// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpLessOrEqual {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a <= b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpAnd// operator = &&// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpAnd {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a && b;                                       }                                                            };// ---------------------------------------------------------- -*- c++ -*-// Boolean Binary Operator// ----------------------------------------------------------------------// file     = boolean_binary.hxx// name     = OpOr// operator = ||// ----------------------------------------------------------------------template<typename T1_value, typename T2_value>                 struct OpOr {                                                  typedef Bool value_t;                                                                                                         static inline value_t                                          apply (T1_value a, T2_value b) {      return a || b;                                       }                                                            };// ----------------------------------------------------------------------// end of file

⌨️ 快捷键说明

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