From: Jakub Jelinek Date: Sat, 30 Sep 2023 09:26:14 +0000 (+0200) Subject: vec.h: Uncomment static_assert X-Git-Tag: basepoints/gcc-15~5791 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d249b7e31eb4e1379a45f90949776c11d29063c;p=thirdparty%2Fgcc.git vec.h: Uncomment static_assert Now that poly_int_pod has been removed and other changes mostly to use {quick,safe}_grow_cleared instead of {quick,safe}_grow for types with non-trivial default construction, we can enable even the last static assertion. From now on, {quick,safe}_grow can only be used with trivially default constructible types. 2023-09-30 Jakub Jelinek * vec.h (quick_grow): Uncomment static_assert. --- diff --git a/gcc/vec.h b/gcc/vec.h index 42eac1c0e1d1..d509639292be 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -1416,7 +1416,7 @@ vec::quick_grow (unsigned len) { gcc_checking_assert (length () <= len && len <= m_vecpfx.m_alloc); #if GCC_VERSION >= 5000 -// static_assert (std::is_trivially_default_constructible ::value, ""); + static_assert (std::is_trivially_default_constructible ::value, ""); #endif m_vecpfx.m_num = len; }