Re: [patch] Constrain allocator_arg_t to only work with valid Allocators

2015-06-30 Thread Jonathan Wakely
On 30/06/15 15:49 +0100, Jonathan Wakely wrote: I'm also playing with another change to make allocator_traits SFINAE-friendly, by only defining the nested allocator_type member when __is_allocator is true. If it works I think that might be worth standardising. Something like this, although with

[patch] Constrain allocator_arg_t to only work with valid Allocators

2015-06-30 Thread Jonathan Wakely
This is what I have been experimenting with as an alternative to making allocator_arg_t non-DefaultConstructible. By replacing allocator_arg_t parameters with __alloc_arg_t<_Alloc> we can constrain constructors to only participate in overload resolution when _Alloc quacks sufficiently like an all