|
CookMem 1.6.0
A C++ memory context / allocator
|
#include <allocator.h>
Public Types | |
| typedef Context | context_type |
| typedef std::false_type | propagate_on_container_copy_assignment |
| typedef std::false_type | propagate_on_container_move_assignment |
| typedef std::false_type | propagate_on_container_swap |
| typedef std::false_type | is_always_equal |
Public Member Functions | |
| MemContextProvider (Context &context) | |
| Context & | get () const |
| bool | operator== (const MemContextProvider &other) const |
| bool | operator!= (const MemContextProvider &other) const |
Provides a caller-owned memory context to Allocator.
Allocator instances copy this provider, so they continue to refer to the same context without being always equal across different contexts.
| typedef Context cookmem::MemContextProvider< Context >::context_type |
The type of the memory context.
| typedef std::false_type cookmem::MemContextProvider< Context >::is_always_equal |
Providers are equal only when they refer to the same context.
| typedef std::false_type cookmem::MemContextProvider< Context >::propagate_on_container_copy_assignment |
Containers keep their own allocator when copy-assigned.
| typedef std::false_type cookmem::MemContextProvider< Context >::propagate_on_container_move_assignment |
Containers keep their own allocator when move-assigned.
| typedef std::false_type cookmem::MemContextProvider< Context >::propagate_on_container_swap |
Containers keep their own allocator when swapped.
|
inlineexplicit |
Constructor.
| context | the memory context to provide. The caller owns it, and it must outlive every allocator that uses this provider. |
|
inline |
Get the memory context.
|
inline |
Check if two providers refer to different memory contexts.
| other | the provider to compare with. |
|
inline |
Check if two providers refer to the same memory context.
| other | the provider to compare with. |