// { dg-do compile { target c++11 } } #include template struct Alloc { Alloc() = default; template Alloc(const Alloc&) { } using value_type = T; T* allocate(unsigned n) { return std::allocator().allocate(n); } void deallocate(T* p, unsigned n) { return std::allocator().deallocate(p, n); } template void destroy(U* p){ p->~U(); } }; class S { ~S() = default; friend Alloc; }; void test_pr108619(Alloc a, S* p) { std::allocator_traits>::construct(a, p); }