https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64128
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Comment on attachment 34150 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34150 testcase Users can specialize std::allocator so we'd need to use SFINAE hacks to find out if __gnu_cxx::new_allocator is the base class and if it's unspecialized. It's a silly test though, if you care about performance there use reserve().