range: add definition for range-scalar addition

This commit is contained in:
Danny Robson 2019-05-29 12:58:46 +10:00
parent 25746b2036
commit cdb3ded3df

View File

@ -114,6 +114,18 @@ cruft::range<T>::operator- (T val) const
} }
//-----------------------------------------------------------------------------
template <typename T>
cruft::range<T>
cruft::range<T>::operator+ (T val) const
{
return cruft::range<T> (
lo + val,
hi + val
);
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
template <typename T> template <typename T>
T T