You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To correctly support the C++ allocator model, or otherwise simplify allocator-aware code.
1. When the C++11 allocator model is available (i.e. BOND_NO_CXX11_ALLOCATOR is not defined) to rebind an allocator type A for type T, should always use std::allocator_traits<A>::template rebind_alloc<T> as I did in the recent Improvements and fixes for C++ nullable implementation and reduce dynamic allocation #174 nullable changes. This is because a valid C++ allocator is no longer required to provide a rebind member template.
2. The integral constant expression for the detection of the Default Allocator can be simplified by a writing trait is_default_allocator<A> that is the integral constant true_type when the given allocator is the Default Allocator, and false_type otherwise.
The text was updated successfully, but these errors were encountered:
To correctly support the C++ allocator model, or otherwise simplify allocator-aware code.
BOND_NO_CXX11_ALLOCATOR
is not defined) to rebind an allocator typeA
for typeT
, should always usestd::allocator_traits<A>::template rebind_alloc<T>
as I did in the recent Improvements and fixes for C++ nullable implementation and reduce dynamic allocation #174 nullable changes. This is because a valid C++ allocator is no longer required to provide arebind
member template.is_default_allocator<A>
that is the integral constanttrue_type
when the given allocator is the Default Allocator, andfalse_type
otherwise.The text was updated successfully, but these errors were encountered: