slycelote / caide

Automates certain common tasks that you do during programming competitions
84 stars 18 forks source link

c++: Incorrect removal of explicitly defaulted/deleted methods #2

Closed slycelote closed 9 years ago

slycelote commented 9 years ago
/* solution.cpp */
class Test {
public:
    Test(int n) : n(n) {}
private:
    Test() = delete;
    int n;
};

void solve(istream& in, ostream& out) {
    Test a(1000);
}

/* submission.cpp */

class Test {
public:
    Test(int n) : n(n) {}
private:
     = delete;
    int n;
};

void solve(istream& in, ostream& out) {
    Test a(1000);
}