From bad800c03d00a57fc21718c160459d9a1e8d747a Mon Sep 17 00:00:00 2001 From: Scott Snyder Date: Wed, 2 Dec 2020 15:42:56 +0100 Subject: [PATCH] vec.h: Fix GCC build with -std=gnu++20 [PR98059] Apparently vec.h doesn't build with -std=c++20/gnu++20, since the DR2237 r11-532 change. template class auto_delete_vec { private: auto_vec_delete (const auto_delete_vec &) = delete; }; which vec.h uses is invalid C++20, one needs to use auto_vec_delete (const auto_delete_vec &) = delete; instead which is valid all the way back to C++11 (and without = delete to C++98). 2020-12-02 Scott Snyder PR plugins/98059 * vec.h (auto_delete_vec): Use DISABLE_COPY_AND_ASSIGN(auto_delete_vec) instead of DISABLE_COPY_AND_ASSIGN(auto_delete_vec) to make it valid C++20 after DR2237. --- gcc/vec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/vec.h b/gcc/vec.h index 14d77e87342..90904515ea0 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -1602,7 +1602,7 @@ class auto_delete_vec : public auto_vec ~auto_delete_vec (); private: - DISABLE_COPY_AND_ASSIGN(auto_delete_vec); + DISABLE_COPY_AND_ASSIGN(auto_delete_vec); }; /* Conditionally allocate heap memory for VEC and its internal vector. */ -- 2.30.2