Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext
make_cons
Description

Returns the result type of make_cons.

Synopsis
template <typename Car, typename Cdr = nil>
struct make_cons;
Parameters

Parameter

Requirement

Description

Car

Any type

The list's head type

Cdr

A cons

The list's tail type (optional)

Expression Semantics
result_of::make_cons<Car, Cdr>::type

Return type: A cons with head element, Car, of type converted following the rules for element conversion, and tail, Cdr.

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
result_of::make_cons<char, result_of::make_cons<int>::type>::type

PrevUpHomeNext