What this C++ initializer_list question tests
This is an easy C++ language-knowledge question that probes understanding of how initializer lists interact with constructor overload resolution. It rewards precise knowledge of the C++ type system and constructor semantics.
To work through problems like this, you need to trace which constructor gets called when an initializer_list is passed, how it competes with other overloads, and what the resulting object contains. The question is quick but exposes gaps in understanding modern C++ initialization rules—something that matters in production codebases and under time pressure in interviews.
- Constructor overload resolution and initializer_list precedence
- Implicit conversion and copy elision
- Uniform initialization syntax in C++11 and later