Name
allocator<void> class — Specializes allocator for void pointers
Synopsis
template <> class allocator<void> {
public:
typedef void* pointer;
typedef const void* const_pointer;
typedef void value_type;
template <class U> struct rebind {
typedef allocator<U> other;
};
};
The allocator<void>
specialization is necessary to represent pointers to void
without permitting the allocation of
objects of type void
.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.