Fix custom allocator test build failures (C++20)

Allocator tests fail to compile in C++20 mode with clang+MS STL due
to missing copy constructors.
This commit is contained in:
Florian Albrechtskirchinger 2022-03-05 10:21:13 +01:00
parent 75e8c9f077
commit 575be1a7fe
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,8 @@ namespace
template<class T> template<class T>
struct bad_allocator : std::allocator<T> struct bad_allocator : std::allocator<T>
{ {
using std::allocator<T>::allocator;
template<class... Args> template<class... Args>
void construct(T* /*unused*/, Args&& ... /*unused*/) void construct(T* /*unused*/, Args&& ... /*unused*/)
{ {

View File

@ -271,7 +271,10 @@ std::string* sax_no_exception::error_string = nullptr;
template<class T> template<class T>
class my_allocator : public std::allocator<T> class my_allocator : public std::allocator<T>
{}; {
public:
using std::allocator<T>::allocator;
};
///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////
// for #3077 // for #3077