http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48631
Summary: [C++0x] default_delete<T[]> accepts pointer conversions in function call operator Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: daniel.krueg...@googlemail.com The following program using 4.7.0 20110409 (experimental) should be rejected, but is accepted: //------------ #include <memory> struct B {}; struct D : B {}; int main() { D d; std::default_delete<B[]> db; typedef decltype(db(&d)) type; } //------------ Reason for this deviation of the spec is the missing deleted function call operator as described in [unique.ptr.dltr.dflt1]: template <class T> struct default_delete<T[]> { constexpr default_delete() noexcept = default; void operator()(T*) const; template <class U> void operator()(U*) const = delete; };