3 ms·
What's the C++ alternative to designated initializers?
by chocolatebunny 14y ago
What's the C++ alternative to designated initializers?
- stephencanon 14y agoConstructors, I would assume, but that's not a very attractive alternative in my opinion.
- haberman 14y agoWith C++11, you can use constexpr constructors to guarantee that they run at compile-time and end up as flat data in the .data/.rodata section instead of run-time static initialization. Or so I'm told by the C++11 people I asked about it.