Re:Microsoft to C99 Developers: Use ISO C++
by chocolatebunny on Monday May 07, 2012 @02:37PM
(#3940315)
What's the C++ alternative to designated initializers?
[ Parent
| on HN ]
Re:Microsoft to C99 Developers: Use ISO C++
by stephencanon on Monday May 07, 2012 @02:55PM
(#3940424)
Constructors, I would assume, but that's not a very attractive alternative in my opinion.
With 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.