diff options
author | Scott Snyder <sss@li-snyder.org> | 2020-12-02 15:42:56 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-12-02 15:42:56 +0100 |
commit | bad800c03d00a57fc21718c160459d9a1e8d747a (patch) | |
tree | 7ce22344c27058d2cfbce4e37388f6a97bec4668 /gcc | |
parent | 05f7a2afe8fac98fb3e70ccd4128e6a2ffd7c817 (diff) | |
download | gcc-bad800c03d00a57fc21718c160459d9a1e8d747a.zip gcc-bad800c03d00a57fc21718c160459d9a1e8d747a.tar.gz gcc-bad800c03d00a57fc21718c160459d9a1e8d747a.tar.bz2 |
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 <typename T>
class auto_delete_vec
{
private:
auto_vec_delete<T> (const auto_delete_vec<T> &) = 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 <sss@li-snyder.org>
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<T>) to make it valid C++20
after DR2237.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/vec.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1602,7 +1602,7 @@ class auto_delete_vec : public auto_vec <T *> ~auto_delete_vec (); private: - DISABLE_COPY_AND_ASSIGN(auto_delete_vec<T>); + DISABLE_COPY_AND_ASSIGN(auto_delete_vec); }; /* Conditionally allocate heap memory for VEC and its internal vector. */ |