Преглед на файлове

fixed ambiguous template call by double cast

Johannes R преди 12 години
родител
ревизия
00d16d821e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      core/vector/Distance.tcc

+ 1 - 1
core/vector/Distance.tcc

@@ -45,7 +45,7 @@ T EuclidianDistance<T>::doCalculate(const VectorT<T>& v1, const VectorT<T>& v2)
 
 //     #endif // NICE_USELIB_IPP
 
-    return T(std::sqrt(dist));
+    return T(std::sqrt( (double) dist)); //double cast neccessary, otherwise the template cast is disambigous
 }