fix hang on windows in pixel_cast

- manifested converting double -> int64_t.
  - it is unclear why this explicitness is needed on windows
    to avoid greater calling itself. But it is clear that the
    static_cast<double>(<std::int64_t>) is not enough for the
    template deduction to match the <double,double> case automatically
  - Making this explicit is probably better anyway, but odd it is needed.
  - Finishes closing #2893, refs #2893, amends 96f7120ecc11 and d29a0f18b1fb9c
  - Seen with both VS 2014 CTP 4 and VS 2015 Preview
This commit is contained in:
Dane Springmeyer 2015-06-12 12:38:22 -07:00
parent 29b464e868
commit 8d3d136da7

View File

@ -99,11 +99,11 @@ struct numeric_compare<T,S,typename std::enable_if<
(std::is_integral<T>::value && std::is_floating_point<S>::value)>::type>
{
static inline bool less(T t, S s) {
return less(static_cast<double>(t),static_cast<double>(s));
return numeric_compare<double,double>::less(static_cast<double>(t),static_cast<double>(s));
}
static inline bool greater(T t, S s) {
return greater(static_cast<double>(t),static_cast<double>(s));
return numeric_compare<double,double>::greater(static_cast<double>(t),static_cast<double>(s));
}
};