Switch to non-template operator> for vm_distance

clang considers the template form to be ambiguous
This commit is contained in:
Kp 2016-01-27 04:01:55 +00:00
parent 5b9ccda8e8
commit 4abbc28d0f

View file

@ -88,11 +88,15 @@ public:
{
return d < rhs.d;
}
/* Clang chokes using a template operator> to swap the arguments.
* Use a non-template operator> for the one needed type.
*/
constexpr bool operator>(const fix &f) const
{
return d > f;
}
template <typename T>
constexpr bool operator>(const T &t) const
{
return t < *this;
}
bool operator>(const T &t) const = delete;
constexpr explicit operator bool() const { return d; }
template <typename T>
operator T() const = delete;