https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87604
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #2) > N.B. this doesn't benefit pmr::polymorphic_allocator because that has a > custom construct member, so that it can do uses-allocator construction. > We could potentially make it work, because we know that if the type > doesn't support uses-allocator construction then polymorphic_allocator > will construct objects the same way as std::allocator would. We would > need to check whether std::uses_allocator is true and the type has an > allcoator-extended move constructor (in either the leading or trailing > allocator form). Making that work is left for another day. A cheaper option here would be to just check is_scalar, rather than checking uses_allocator.