mercredi 8 mars 2017

Emulating std::initializer_list before C++11 STL

Pre C++11-STL, is there any way to make a class constructor from an std::initializer_list-like object, which would work when with braced list initialization like std::initializer_list does?

I can use C++11 (and even C++14) language features. However, with some projects I'm still using libstdc++ on Xcode, which has no C++11 support, since I need to support OS X 10.6.

Aucun commentaire:

Enregistrer un commentaire