News for hackers. Stuff that matters.
Re:Non-constant constant-expressions in C++ by barrkel on Sunday April 26, 2015 @05:04PM (#9443258)
Articles like this are one of the reasons I don't profess to know C++ well. I know almost all of the features in isolation, and many in combination, but new combinations are being discovered with novel and surprising effects, like this article demonstrates.

This is not a good advertisement for C++. It would have been much healthier to not have had such a powerful and under-researched template instantiation mechanism, and instead have a genuine compile-time macro language. It's hard to see a way back though. Everything added - like constexpr functions - to make compile-time execution more sane, can be put back into the mix to complect things even further.

Re:Non-constant constant-expressions in C++ by MaulingMonkey on Sunday April 26, 2015 @05:27PM (#9443333)
> Articles like this are one of the reasons I don't profess to know C++ well.

...any why I profess nobody knows C++ well, even those on the standards committee ;)

Re:Non-constant constant-expressions in C++ by karmakaze on Monday April 27, 2015 @08:42AM (#9445816)
The demonstrated result is unfortunate, but shouldn't really surprise anyone with a history of C++. 'Template' happens. Attempts to eliminate all such curiosities will only make the language larger and more complex, expanding the cycle.
Re:Non-constant constant-expressions in C++ by yoklov on Sunday April 26, 2015 @09:05PM (#9443925)
> instead have a genuine compile-time macro language

Yep. Jesus christ why didn't they do this. Going further, D (or more recently, JAI) style CTFE would have been great.

But no such luck.