Can I achieve the same effects without the C++ header <initializer_list>?
Does class initializer_list have to live in namespace std (does the compiler require this)?
I’m fine with a solution that works on the big five (GCC, MSVC, Intel, Clang, Comeau)
It’s tightly coupled as per standard. It’s a wrapper around a compiler-constructed array (though the standard doesn’t say how precisely — GCC uses constructor with pointer and size, MSVC uses constructor with two points). And yes, it’s required to be in namespace
std, and in header<initializer_list>.You’d have to see what constructors they use in each compiler you want to support and replicate that in your version, but TBH, I fail to see the point.