This question evaluates understanding of C++ special-member-function rules—specifically when the compiler implicitly declares a default constructor, when that implicitly-declared constructor is defined as deleted, and how user-declared copy/move constructors, copy/move assignments, destructors, and member/base types (const, reference, or non-default-constructible) affect generation. Commonly asked to assess mastery of language semantics and object-initialization pitfalls, it belongs to the Software Engineering Fundamentals domain and tests both conceptual understanding of compiler behavior and practical application in C++ code.
You are given a C++ class type T.
T
?
T t;
is ill-formed)?
const
?
Answer in terms of the C++ “special member functions” model (rule of 0/3/5) and include a few small examples of classes that: