You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling with c++23 the following errors are reported in cppspmd_sse.h:
In file included from /media/dezlow/Drive/Dev/C++/Oneiro/ThirdParty/KTX/lib/basisu/encoder/basisu_kernels_sse.cpp:41:
/media/dezlow/Drive/Dev/C++/Oneiro/ThirdParty/KTX/lib/basisu/encoder/cppspmd_sse.h:496:10: error: non-const lvalue reference to type 'cppspmd_sse41::spmd_kernel::vfloat' cannot bind to a temporary of type 'cppspmd_sse41::spmd_kernel::vfloat'
return dst;
^~~
/media/dezlow/Drive/Dev/C++/Oneiro/ThirdParty/KTX/lib/basisu/encoder/cppspmd_sse.h:508:10: error: non-const lvalue reference to type 'cppspmd_sse41::spmd_kernel::vfloat' cannot bind to a temporary of type 'cppspmd_sse41::spmd_kernel::vfloat'
return dst;
^~~
This is with Clang 15 or 16 (--std=c++2b) but probably other c++23 capable compilers as well.
Writing to an r_value dst seems to have no purpose. In order for this overload to be called you either have to pass a constant as dst or use std_move(dst_param) when calling it which means dst_param will be thrown away. I think the proper fix is
When compiling with c++23 the following errors are reported in cppspmd_sse.h:
This is with Clang 15 or 16 (
--std=c++2b
) but probably other c++23 capable compilers as well.Here is one of the functions
Writing to an r_value dst seems to have no purpose. In order for this overload to be called you either have to pass a constant as dst or use
std_move(dst_param)
when calling it which means dst_param will be thrown away. I think the proper fix isbut I do not understand the real purpose of this code. Please advise on the correct fix.
The text was updated successfully, but these errors were encountered: