[Bug c++/37860] default and delete used w/ member functions vs. initialization
bkoz at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Oct 17 08:20:00 GMT 2008
------- Comment #1 from bkoz at gcc dot gnu dot org 2008-10-17 08:19 -------
Sorry, that should have a single argument ctor.
Like:
struct b
{
bool t;
b() = default;
~b() = default;
b& operator=(const b&) = delete;
b(const b&) = delete;
b(bool) { }
};
Gives:
%g++ -std=c++0x -c atomic_init_forms.cc
atomic_init_forms.cc: In function 'int main()':
atomic_init_forms.cc:8: error: deleted function 'b::b(const b&)'
atomic_init_forms.cc:16: error: used here
atomic_init_forms.cc:8: error: deleted function 'b::b(const b&)'
atomic_init_forms.cc:19: error: used here
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37860
More information about the Gcc-bugs
mailing list