소스 검색

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
 }