Implementing a std::array-like container with a C++11 initializer_list
The only and imo very inconvenient caveat of std::array is that it can't deduce its size from the initializer list like built-in C arrays, it's size must be passed as a template. Is it possible to implement a std::array-like container (a thin wrapper around a built-in C array) with a C++11 initializer_list? I ask because, unlike std::array, it would automatically deduce the size of the array from the initializer list which is a lot more convenient. For example: // il_array is the hypothetical container // automatically deduces its size from the initalizer list il_array <int> myarr = {2, 4, 6,