fix a type converison problem
...better state explicitly we're requiring a rational factor
This commit is contained in:
parent
7941865d5d
commit
080d6913c6
1 changed files with 7 additions and 0 deletions
|
|
@ -238,6 +238,13 @@ namespace time {
|
|||
return Offset(distance);
|
||||
}
|
||||
|
||||
template<typename INTX>
|
||||
inline Offset
|
||||
operator* (boost::rational<INTX> factor, Offset const& o)
|
||||
{
|
||||
return boost::rational<int64_t>(factor.numerator(), factor.denominator()) * o;
|
||||
}
|
||||
|
||||
/** stretch offset by a possibly fractional factor */
|
||||
Offset
|
||||
operator* (boost::rational<int64_t> factor, Offset const& o);
|
||||
|
|
|
|||
Loading…
Reference in a new issue