...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> typenameresult_of::make_cons
<Car>::type make_cons(Car const& car); template <typename Car, typename Cdr> typenameresult_of::make_cons
<Car, Cdr>::type make_cons(Car const& car, Cdr const& cdr);
Parameter |
Requirement |
Description |
---|---|---|
|
Instance of |
The list's head |
|
Instance of |
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))