add mult to safe
This commit is contained in:
parent
fd4fc4f0cb
commit
e71ea52075
1 changed files with 1 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ namespace fc {
|
|||
if( b.value < 0 && a.value < std::numeric_limits<T>::min() - b.value ) FC_CAPTURE_AND_THROW( underflow_exception, (a)(b) );
|
||||
return safe(a.value+b.value);
|
||||
}
|
||||
safe& operator *= ( T v ) { value *= v; return *this; }
|
||||
safe& operator -= ( const safe& b ) { return *this += safe(-b.value); }
|
||||
safe operator -()const{ return safe(-value); }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue