https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78052
Bug ID: 78052 Summary: [5/6/7 Regression] allocator_traits<allocator<T>> partial specialization vs allocator<void> Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- This used to work, until I added a partial specialization for allocator_traits<allocator<T>> which assumes that allocator<T>::construct and allocator<T>::destroy exist: #include <memory> int main() { int i; std::allocator<void> a; std::allocator_traits<std::allocator<void>>::construct(a, &i, 0); std::allocator_traits<std::allocator<void>>::destroy(a, &i); } std::allocator<void> isn't really a valid, because void is not an object type, but it is a "proto-allocator" according to the Networking TS, and the construct/destroy functions don't dependon the value_type anyway so there's no reason this code shouldn't work.