http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53722
Bug #: 53722 Summary: [C++0x] Returning implicit conversion class with deleted copy constructor Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: rainarchit...@gmail.com struct Uncopyable { public: Uncopyable() {} Uncopyable(const Uncopyable&) = delete; }; struct Locker: public Uncopyable { Locker(void*) {} // declaration without a definition //Locker(const Locker&); }; struct SmartPtr { // error: use of deleted function «Locker::Locker(const Locker&)» Locker lock() { return 0; } }; But if uncomment «Locker(const Locker&)» constructor declaration even without a definition, this code compile and work fine.