瀏覽代碼

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
 }