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.
This commit is contained in:
Scott Snyder
2020-12-02 15:42:56 +01:00
committed by Jakub Jelinek
parent 05f7a2afe8
commit bad800c03d

View File

@@ -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. */