As C++ metaprogramming is functional: is there any way of doing something comparable to any functional programming language's (e.g. Haskell's) let or where construct?
I'm using Boost::MPL but would like to have more structure for longer metafunctions. Splitting into several functions is fine but I'd prefer let/where in some cases.
constexpr
instead of templates. – Gaylordgaylussacconstexpr
makes meta-programming more structured and allowslet
andwhere
? – Colincolinsonlet x = y in z
is almost the same as(\x. z) y
, so if anonymous functions are encodable maybe that's enough. – Lashaunda