Closed lien0n closed 4 years ago
Thanks for this report! What MSVC version are you using?
Oh, sorry to miss that. It's MSVC 2017.
There is a stackoverflow post for this kind of issue: https://stackoverflow.com/questions/1726740/c-error-operator-2-overloads-have-similar-conversions
We've narrowed this down to our lack of support for 32-bit builds. In a08e68b (which is on release-2.0.x
) I added a CMake check to make sure that a 32-bit CMake target isn't used. When a 64-bit generator is used, then things should compile OK. Here's the VS2017 generator we check in our CI: https://github.com/ospray/ospray/blob/release-2.0.x/.gitlab-ci.yml#L167 (the first argument to the script is passed as -G ${arg}
to the underlying CMake line).
If using the 64-bit generator doesn't work for you, please re-open and we can investigate futher!
Fixed. Thanks!
A bunch of errors like below
.\ospray\Build\OpenVKL\src\openvkl\drivers\ispc\volume\amr\AMRAccel.cpp(118): error C2666: 'ospcommon::math:: vec_t<float,3,false>::operator []': 4 overloads have similar conversions [.\ospray\Build\OpenVKL\build\openvk l\drivers\ispc\openvkl_module_ispc_driver.vcxproj] [.\ospray\Build\OpenVKL.vcxproj] .\ospray\build\install\ospcommon\include\ospcommon\math\vec.h(199): note: could be 'T &ospcommon:: math::vec_t<T,3,false>::operator [](const size_t)' with [ T=float ] .\ospray\build\install\ospcommon\include\ospcommon\math\vec.h(193): note: or 'const T &ospco mmon::math::vec_t<T,3,false>::operator [](const size_t) const' with [ T=float ] .\ospray\Build\OpenVKL\src\openvkl\drivers\ispc\volume\amr\AMRAccel.cpp(118): note: or 'buil t-in C++ operator[(T, int)' with [ T=float ] .\ospray\Build\OpenVKL\src\openvkl\drivers\ispc\volume\amr\AMRAccel.cpp(118): note: or 'buil t-in C++ operator[(T, int)' with [ T=float ] .\ospray\Build\OpenVKL\src\openvkl\drivers\ispc\volume\amr\AMRAccel.cpp(118): note: while trying t o match the argument list '(ospcommon::math::vec3f, int)'
Looks like in ".\ospcommon\include\ospcommon\math\vec.h", there is ambiguity between
inline const T &operator[](const size_t idx) const { assert(idx < 2); return (&x)[idx]; }
and theoperator*()
converter.