Chapter 3 | More meta - kuredoro/mplbook_solutions GitHub Wiki
Points to remember:
-
Metafunction forwarding
-
Metafunction class
-
Higher-order functions
-
Lambda expression (metaF class or a placeholder expression)
-
Placeholder expressions (
mpl::arg<N>
or a template with a least one placeholder expression)a. Partial metafunction application (
plus<_1, _1>
orplus<_1, 42>
)b. Metafunction composition
-
mpl::lambda
(turns lambda expression into metafunction class) -
mpl::apply
(used to invoke lambda expressions)
Don't assume that mpl::vector
s of the same content will have the same type. Check that two vectors are equal with mpl::equal
inside static_assert
.