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

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
make_set
Description

Create a set from one or more values.

Synopsis
template <typename T0, typename T1,... typename TN>
typename result_of::make_set<T0, T1,... TN>::type
make_set(T0 const& x0, T1 const& x1... TN const& xN);

The variadic function accepts 0 to FUSION_MAX_VECTOR_SIZE [9] elements, where FUSION_MAX_VECTOR_SIZE is a user definable predefined maximum that defaults to 10. You may define the preprocessor constant FUSION_MAX_VECTOR_SIZE before including any Fusion header to change the default. Example:

#define FUSION_MAX_VECTOR_SIZE 20
Parameters

Parameter

Requirement

Description

x0, x1,... xN

Instances of T0, T1,... TN

The arguments to make_set

Expression Semantics
make_set(x0, x1,... xN);

Return type: result_of::make_set<T0, T1,... TN>::type

Semantics: Create a set from x0, x1,... xN.

Precondition: There may be no duplicate key types.

Header
#include <boost/fusion/container/generation/make_set.hpp>
#include <boost/fusion/include/make_set.hpp>
Example
make_set(123, "hello", 12.5)
See also

boost::ref



[9] set is implemented in terms of the vector. That is why we reuse FUSION_MAX_VECTOR_SIZE


PrevUpHomeNext