What is the type of myCollection after the following declaration?
auto myCollection = {1, 2, 3};Show answer and explanation
auto myCollection = {1, 2, 3}; deduces std::initializer_list<int>. All elements must support deduction of one common element type.
auto myCollection = {1, 2, 3}; deduces std::initializer_list<int>. All elements must support deduction of one common element type.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.