If one day we have static constexpr lambdas, wouldn't we be able to use some kind of lambda meta-functions
We don't need constexpr lambdas to achieve this. We can do higher-order type
computations using dependent typing. I show here how to implement boost
fusion
filter so it will take a lambda rather than a MPL placeholder expression:
http://pfultz2.com/blog/2015/01/24/dependent-typing/
Which is based on the ideas presented by Zach Laine and Matt Calabrese
several
years ago at boostcon. So in essence you can write this in C++14:
auto numbers = simple_filter(some_fusion_sequence, [](auto x)
{
return is_integral
Is not that what the proposed Boost.Hana and Boost.Fit do already using a specific trick?
That trick, in general, is only used to achieve `constexpr` initialization of lambdas, which is necessary when declaring global lambdas. In can be used in other ways to allow type deduction of lambdas in a `constexpr` context. However, in general, with dependently-typed metaprogramming this isn't necessary. Paul -- View this message in context: http://boost.2283326.n4.nabble.com/Simple-C-11-metaprogramming-tp4676344p467... Sent from the Boost - Dev mailing list archive at Nabble.com.