gcc-13 rebind compile failure fix. Adding struct rebind for custom allocators as per this thread https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72792#c7
This commit is contained in:
parent
b504dca35a
commit
0ae7624c14
@ -20,6 +20,11 @@ struct bad_allocator : std::allocator<T>
|
|||||||
{
|
{
|
||||||
using std::allocator<T>::allocator;
|
using std::allocator<T>::allocator;
|
||||||
|
|
||||||
|
template<typename U>
|
||||||
|
struct rebind {
|
||||||
|
using other = bad_allocator<U>;
|
||||||
|
};
|
||||||
|
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
void construct(T* /*unused*/, Args&& ... /*unused*/)
|
void construct(T* /*unused*/, Args&& ... /*unused*/)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -187,6 +187,11 @@ 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>
|
||||||
{
|
{
|
||||||
|
template<typename U>
|
||||||
|
struct rebind {
|
||||||
|
using other = my_allocator<U>;
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using std::allocator<T>::allocator;
|
using std::allocator<T>::allocator;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user