template<typename T>
void f()
{
if constexpr (std::is_trivial_v<T>)
{
// Does the following line never fail?
static_assert(std::is_standard_layout_v<T>);
}
}
Is
std::is_standard_layout_v<T>always true ifstd::is_trivial_v<T>is true?If no, is there any counterexamples?