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:
parent
75e8c9f077
commit
575be1a7fe
@ -39,6 +39,8 @@ namespace
|
||||
template<class T>
|
||||
struct bad_allocator : std::allocator<T>
|
||||
{
|
||||
using std::allocator<T>::allocator;
|
||||
|
||||
template<class... Args>
|
||||
void construct(T* /*unused*/, Args&& ... /*unused*/)
|
||||
{
|
||||
|
||||
@ -271,7 +271,10 @@ std::string* sax_no_exception::error_string = nullptr;
|
||||
|
||||
template<class T>
|
||||
class my_allocator : public std::allocator<T>
|
||||
{};
|
||||
{
|
||||
public:
|
||||
using std::allocator<T>::allocator;
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// for #3077
|
||||
|
||||
Loading…
Reference in New Issue
Block a user