1 #include "hmbdc/Copyright.hpp" 5 template <
char const NAME[],
typename T>
11 explicit operator T() {
15 bool operator < (Typed t)
const {
return v_ < t.v_;}
16 bool operator > (Typed t)
const {
return v_ > t.v_;}
17 bool operator <= (Typed t)
const {
return v_ <= t.v_;}
18 bool operator >= (Typed t)
const {
return v_ >= t.v_;}
19 bool operator == (Typed t)
const {
return v_ == t.v_;}
21 Typed operator+(Typed t)
const {
return Typed(v_ + t.v_);}
22 Typed operator-(Typed t)
const {
return Typed(v_ - t.v_);}
23 Typed operator*(Typed t)
const {
return Typed(v_ * t.v_);}
24 Typed operator/(Typed t)
const {
return Typed(v_ / t.v_);}
26 Typed& operator+=(Typed t) {v_ += t.v_;
return *
this;}
27 Typed& operator-=(Typed t) {v_ -= t.v_;
return *
this;}
28 Typed& operator*=(Typed t) {v_ *= t.v_;
return *
this;}
29 Typed& operator/=(Typed t) {v_ /= t.v_;
return *
this;}