I have some questions regarding the design of std::initializer_list
.
I didn't find answers in [support.initlist].
Why does it have an explicitly defined default constructor?
Why this constructor is not constexpr
?
Why the method size()
is not constexpr
?
Why there's no traits giving the size of initializer_list
(like specializing std::tuple_size
)?
Why it's not possible to statically access its elements (like specializing std::get
)?
What happens when sizeof
is applied to initializer_list
?