In short, why the code below behaves like described in the comments?
struct A
{
A() = delete;
//A(const A&) {} // uncommenting this...
};
int main()
{
A a{}; // ... breaks this
//A(); // this fails in either case because of `A() = delete;` only
}
What part of the standard (or at least a page on cppreference) should I look at to understand this?
Aucun commentaire:
Enregistrer un commentaire