Title
Is std::allocator_traits<Alloc>::rebind_alloc SFINAE-friendly?
Status
new
Section
[allocator.traits.types]
Submitter
Jiang An

Created on 2022-01-24.00:00:00 last changed 33 months ago

Messages

Date: 2022-03-15.00:00:00

[ 2022-03-04; Reflector poll ]

Set priority to 3 after reflector poll. Probably NAD, since [allocator.requirements.general]/11 allows any allocator instantiation to fail with a hard error outside the immediate context, making it impossible to guarantee a SFINAE-friendly result. Also unclear what motivation there is for it being SFINAE friendly.

Date: 2022-01-15.00:00:00

[ 2022-01-29; Daniel comments ]

This issue has some overlap with LWG 3545 in regard to the question how we should handle the rebind member template of the pointer_traits primary template as specified by [pointer.traits.types] p3. It would seem preferable to decide for the same approach in both cases.

Date: 2022-01-24.00:00:00

[allocator.traits.types]/11 says that the instantiation of rebind_alloc is sometimes ill-formed, however, it's unclear such ill-formedness results in substitution failure or hard error. It seems that current implementations (libc++, libstd++, MSVC STL) give substitution errors, and we should reword [allocator.traits.types]/11 with "Constraints:".

History
Date User Action Args
2022-03-04 14:33:52adminsetmessages: + msg12392
2022-01-29 12:13:24adminsetmessages: + msg12282
2022-01-24 00:00:00admincreate