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
We have the following in the vector_operator test for sycl::vec<bool>, where the discarded branch of if constexpr is ill-formed - it is trying to increment vec<bool> which is not allowed by the SPEC.
if constexpr (!std::is_same_v<bool, bool>) {
for (int i = 0; i < 1; ++i) {
resArr[i] = static_cast<bool>(1);
}
for (int i = 0; i < 1; ++i) {
resArr2[i] = static_cast<bool>(1) + static_cast<bool>(1);
}
testVec1Copy = testVec1;
resVec = testVec1Copy++; // <------------------- Error
C++ requires that Outside a template, a discarded statement is fully checked. if constexpr is not a substitute for the #if preprocessing directive:https://en.cppreference.com/w/cpp/language/if
Description
We have the following in the vector_operator test for
sycl::vec<bool>
, where the discarded branch ofif constexpr
is ill-formed - it is trying to incrementvec<bool>
which is not allowed by the SPEC.C++ requires that
Outside a template, a discarded statement is fully checked. if constexpr is not a substitute for the #if preprocessing directive:
https://en.cppreference.com/w/cpp/language/ifFaulty CTS test: https://github.com/KhronosGroup/SYCL-CTS/blob/SYCL-2020/tests/vector_operators/generate_vector_operators.py#L212
The text was updated successfully, but these errors were encountered: