| Home | Libraries | People | FAQ | More

##### make_cons

###### Description

Create a `cons` from `car` (head) and optional `cdr` (tail).

###### Synopsis

    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);

###### Parameters

Parameter | Requirement | Description
--- | --- | ---
`car` | Instance of `Car` | The list's head
`cdr` | Instance of `Cdr` | The list's tail (optional)

###### Expression Semantics

    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).

###### Header

    #include <boost/fusion/container/generation/make_cons.hpp>
    #include <boost/fusion/include/make_cons.hpp>

###### Example

    make_cons('x', make_cons(123))

###### See also

`boost::ref`