]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vec.h: Uncomment static_assert
authorJakub Jelinek <jakub@redhat.com>
Sat, 30 Sep 2023 09:26:14 +0000 (11:26 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 30 Sep 2023 09:26:14 +0000 (11:26 +0200)
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  <jakub@redhat.com>

* vec.h (quick_grow): Uncomment static_assert.

gcc/vec.h

index 42eac1c0e1d1fefe50a79dfbe21f5256657c8ae0..d509639292bef2acfa6792d93724f9b328d1b974 100644 (file)
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -1416,7 +1416,7 @@ vec<T, A, vl_embed>::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 <T>::value, "");
+  static_assert (std::is_trivially_default_constructible <T>::value, "");
 #endif
   m_vecpfx.m_num = len;
 }