Enable full functionality of shared_ptr<const void> by adding allocator<const void>. Credit to John Hurley for discovering this bug.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@148508 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6e4971fafe
commit
a18778751c
@ -672,6 +672,17 @@ public:
|
||||
template <class _Up> struct rebind {typedef allocator<_Up> other;};
|
||||
};
|
||||
|
||||
template <>
|
||||
class _LIBCPP_VISIBLE allocator<const void>
|
||||
{
|
||||
public:
|
||||
typedef const void* pointer;
|
||||
typedef const void* const_pointer;
|
||||
typedef const void value_type;
|
||||
|
||||
template <class _Up> struct rebind {typedef allocator<_Up> other;};
|
||||
};
|
||||
|
||||
// pointer_traits
|
||||
|
||||
template <class _Tp>
|
||||
|
Loading…
Reference in New Issue
Block a user