...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Create a cons from car (head) and optional cdr (tail).
template <typename Car> typename result_of::make_cons<Car>::type make_cons(Car const& car); template <typename Car, typename Cdr> typename result_of::make_cons<Car, Cdr>::type make_cons(Car const& car, Cdr const& cdr);
Parameter |
Requirement |
Description |
---|---|---|
car |
Instance of Car |
The list's head |
cdr |
Instance of Cdr |
The list's tail (optional) |
make_cons(car, cdr);
Return type: result_of::make_cons<Car, Cdr>::type or result_of::make_cons<Car>::type
Semantics: Create a cons from car (head) and optional cdr (tail).
#include <boost/fusion/container/generation/make_cons.hpp> #include <boost/fusion/include/make_cons.hpp>
make_cons('x', make_cons(123))