§The Annotated C++ StandardC++ 标准注疏 中文

Quizzes

Language-lawyer quizzes by topic.

Exam 1 · Object model and lifetime25 questions on where objects come from, when lifetime begins and ends, whether old names still work after storage is reused, how long temporaries live, and through which glvalue types an object may be read or written. Every question comes with a verdict and paragraph references into the current draft.doneobject modellifetimestorage durationtemporariesExam 2 · Initialization, value categories and references25 questions on where default-, value- and zero-initialization part ways, list-initialization and narrowing, how the aggregate rules changed between standards, copy- versus direct-initialization, reference binding, value categories and decltype, guaranteed copy elision, implicit move, and C++26 erroneous behavior and static initialization.doneinitializationlist-initializationaggregatesreference bindingExam 3 · Name lookup, overload resolution and access control25 questions on scopes and hiding, unqualified and qualified lookup, ADL and hidden friends, using-declarations and using-directives, member lookup under multiple inheritance, the ranking and tie-breaker rules of overload resolution, C++20's rewritten comparison operators, and where access control sits in the whole process.doneexamname lookupADLoverload resolutionExam 4 · Templates, deduction and constraints25 questions on two-phase lookup and dependent names, the various sources of IFNDR, template argument deduction and SFINAE, partial ordering and specialization, CTAD, constraint satisfaction and subsumption, NTTPs, fold expressions, and discarded statements of if constexpr.doneexamtemplatestwo-phase lookuptemplate argument deductionExam 5 · Expressions, evaluation order and constant evaluation25 questions on evaluation order, integral promotions and arithmetic conversions, shifts and out-of-range conversions, pointer comparison, the conditional operator, lambda captures and closure types, structured bindings, constant evaluation, immediate functions and static initialization order, with the emphasis on telling UB, unspecified behavior and implementation-defined behavior apart.doneevaluation orderarithmetic conversionsUBlambdasExam 6 · New rules from C++20 to C++2625 questions on the edges of rules added since C++20 - explicit object parameters, a few C++23 syntax relaxations, coroutine restrictions and parameter lifetimes, defaulted comparison and rewritten candidates, consteval and if consteval, exposures in modules, and C++26 erroneous behavior, the _ placeholder, pack indexing, structured binding packs and conditions, delete with a reason, static_assert messages, constexpr placement new, contracts and static reflection.doneexamC++20C++23C++26