by vinkelhake · 12y ago · 0 comments
constexpr functions where quite restrictive in C++11. They could pretty much only contain a single expression and a return. C++14 significantly relaxes these restrictions.
http://en.wikipedia.org/wiki/C%2B%2B14#Relaxed_constexpr_res...
Type-level meta programming is still confined to using templates though...
https://github.com/hun-nemethpeter/cpp-reflector-mini/blob/m...
it calls a function at compile time to expand placeholders, and then compiles the generated string via the mixin() statement and carries on with the code. far more pleasant than c++.
Which there is less of need for this, since we have better type deduction in C++11 and 14 as well.