Categories
News Review from The World Web Times

Why is std::is_trivial deprecated in C++26? – Stack Overflow


This change comes from P3247: Deprecate the notion of trivial types. The problem with std::is_trivial is that it mixes two different checks: std::is_trivially_copyable std::is_trivially_default_constructible std::is_trivial is somewhat useless These two checks are used in different situations, so having them bunched together into a single trait isn’t very useful. For example, a container that …