mirror of
https://github.com/boostorg/multi_index.git
synced 2026-07-21 13:23:43 +00:00
avoided void& in non_std_allocator<void>
This commit is contained in:
@@ -70,6 +70,7 @@ Acknowledgements
|
||||
<li>Avoided usage of <code>std::allocator</code> members deprecated in C++17.
|
||||
Contributed by Daniela Engert.
|
||||
</li>
|
||||
<li>Maintenance fixes.</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
@@ -571,7 +572,7 @@ Acknowledgements
|
||||
|
||||
<br>
|
||||
|
||||
<p>Revised January 1st 2018</p>
|
||||
<p>Revised January 3rd 2018</p>
|
||||
|
||||
<p>© Copyright 2003-2018 Joaquín M López Muñoz.
|
||||
Distributed under the Boost Software
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Used in Boost.MultiIndex tests.
|
||||
*
|
||||
* Copyright 2003-2015 Joaquin M Lopez Munoz.
|
||||
* Copyright 2003-2018 Joaquin M Lopez Munoz.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -134,4 +134,28 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class non_std_allocator<void>
|
||||
{
|
||||
public:
|
||||
typedef void* pointer;
|
||||
typedef const void* const_pointer;
|
||||
typedef void value_type;
|
||||
template<class U>struct rebind{typedef non_std_allocator<U> other;};
|
||||
|
||||
non_std_allocator(){}
|
||||
non_std_allocator(const non_std_allocator<void>&){}
|
||||
template<class U>non_std_allocator(const non_std_allocator<U>&,int=0){}
|
||||
|
||||
friend bool operator==(const non_std_allocator&,const non_std_allocator&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
friend bool operator!=(const non_std_allocator&,const non_std_allocator&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user