When does a C++ compiler NOT implicitly declare a default constructor for a class?
Correct answer C. When the class declares any constructor of its own
Explanation
An implicit default constructor is declared only if the class has no user-declared constructors at all. Declaring, for example, Point(int x, int y) suppresses it, so Point p; would no longer compile. You can bring it back explicitly with Point() = default;. Destructors, static members and ordinary member functions do not affect this rule.
Answer checked How we write and check questions
Discussion