This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53722] New: [C++0x] Returning implicit conversion class with deleted copy constructor
- From: "rainarchitect at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jun 2012 14:23:39 +0000
- Subject: [Bug c++/53722] New: [C++0x] Returning implicit conversion class with deleted copy constructor
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: rainarchitect@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.