diff --git a/operators.htm b/operators.htm index a33e814..37820e1 100644 --- a/operators.htm +++ b/operators.htm @@ -132,18 +132,18 @@ class MyInt : boost::operators<MyInt> { - bool operator<(const MyInt& x) const; + bool operator<(const MyInt& x) const; bool operator==(const MyInt& x) const; - MyInt& operator+=(const MyInt& x); - MyInt& operator-=(const MyInt& x); - MyInt& operator*=(const MyInt& x); - MyInt& operator/=(const MyInt& x); - MyInt& operator%=(const MyInt& x); - MyInt& operator|=(const MyInt& x); - MyInt& operator&=(const MyInt& x); - MyInt& operator^=(const MyInt& x); - MyInt& operator++(); - MyInt& operator--(); + MyInt& operator+=(const MyInt& x); + MyInt& operator-=(const MyInt& x); + MyInt& operator*=(const MyInt& x); + MyInt& operator/=(const MyInt& x); + MyInt& operator%=(const MyInt& x); + MyInt& operator|=(const MyInt& x); + MyInt& operator&=(const MyInt& x); + MyInt& operator^=(const MyInt& x); + MyInt& operator++(); + MyInt& operator--(); }; @@ -345,7 +345,7 @@ class MyInt
As Daniel Krügler pointed out, this technique violates 14.6.5/2
- and is thus non-portable. The reasoning is, that the operators injected
+ and is thus non-portable. The reasoning is, that the operators injected
by the instantiation of e.g.
less_than_comparable<myclass>
can not be found
by ADL according to the rules given by 3.4.2/2, since myclass is
@@ -445,6 +445,9 @@ const point<float> pi_over_4_normalized = pi_over_4 / length(pi_over_4);
optional template parameter B
, which is not shown, for the
base class chaining technique.
The primary operand type T
needs to be of class type,
+ built-in types are not supported.
- Supports the operations and has the requirements of + Supports the operations and has the requirements of | - Supports the operations and has the requirements of + Supports the operations and has the requirements of | - Supports the operations and has the requirements of + Supports the operations and has the requirements of | - Supports the operations and has the requirements of + Supports the operations and has the requirements of |
- Supports the operations and has the requirements of
+ Supports the operations and has the requirements of
|