|
cxxomfort
rel.20210622
Simple backports for C++ - http://ryan.gulix.cl/fossil.cgi/cxxomfort/
|
Macros for generating relational operators. More...
Macros | |
| #define | CXXO_GENERATE_RELATIONALS2(L, R) |
| Automatically generates relational operators between the classes L and R . More... | |
| #define | CXXO_GENERATE_RELATIONALS(T) |
| Automatically generates nonmember relational operators >, >=, <= and != . More... | |
Macros for generating relational operators.
| #define CXXO_GENERATE_RELATIONALS2 | ( | L, | |
| R | |||
| ) |
Automatically generates relational operators between the classes L and R .
If classes L and R have working operators == and <, invoking this macro outside their class definition will automatically generate compatible non-member operators != , <= , >, >= .
All generated operators have the signature bool(L const&, R const&) and are noexcept or throw() .
| #define CXXO_GENERATE_RELATIONALS | ( | T | ) |
Automatically generates nonmember relational operators >, >=, <= and != .
If class T has working operators == and <, invoking this macro outside the class definition will automatically generate compatible non-member operators != , <= , >, >= .
All generated operators return bool and are noexcept or throw() .
1.8.13