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
The std::is_trivial type trait has been deprecated in C++26 by https://isocpp.org/files/papers/P3247R2.html ; some code in oneDPL is still using it, and needs to be ported away.
Note that I'm talking specifically about is_trivial and is_trivial_v, the other type traits are OK.
The direct (= semantically equivalent) non-deprecated replacement of is_trivial_v<T> would be to check for std::is_trivially_default_constructible_v<T> && std::is_trivially_copyable_v<T>.
However the ideal replacement is to reason about what exact type properties are needed, and test for those using specific type traits; for instance, check for trivial copy assignment, trivial destruction, and so on.
(The problem is that the definitions of trivial/trivially copyable encompass too much, and are inaccurate.)
Hello,
The
std::is_trivial
type trait has been deprecated in C++26 by https://isocpp.org/files/papers/P3247R2.html ; some code in oneDPL is still using it, and needs to be ported away.https://github.com/search?q=repo%3Aoneapi-src%2FoneDPL%20std::is_trivial&type=code
Note that I'm talking specifically about
is_trivial
andis_trivial_v
, the other type traits are OK.The direct (= semantically equivalent) non-deprecated replacement of
is_trivial_v<T>
would be to check forstd::is_trivially_default_constructible_v<T> && std::is_trivially_copyable_v<T>
.However the ideal replacement is to reason about what exact type properties are needed, and test for those using specific type traits; for instance, check for trivial copy assignment, trivial destruction, and so on.
(The problem is that the definitions of trivial/trivially copyable encompass too much, and are inaccurate.)
Please also see the remarks to this mailing list thread for libstdc++: https://gcc.gnu.org/pipermail/libstdc++/2024-December/060119.html
Thanks,
The text was updated successfully, but these errors were encountered: