Quantcast
Channel: User HolyBlackCat - Stack Overflow
Viewing all articles
Browse latest Browse all 1313

Comment by HolyBlackCat on How to use default member initializer if `std::initializer_list` ctor exists in C++11?

$
0
0
As many before you, you've stumbled upon one of the issues with the "uniform" initialization. :P The constructors of std::vector blow up in the same way. The solution? Don't use {} everywhere, only use it when you want the initializer_list constructor. And to prevent narrowing you instead turn on the warnings.

Viewing all articles
Browse latest Browse all 1313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>