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
as_set
Description

Convert a fusion sequence to a set.

Synopsis
template <typename Sequence>
typename result_of::as_set<Sequence>::type
as_set(Sequence& seq);

template <typename Sequence>
typename result_of::as_set<Sequence const>::type
as_set(Sequence const& seq);
Parameters

Parameter

Requirement

Description

seq

An instance of Sequence

The sequence to convert.

Expression Semantics
as_set(seq);

Return type: result_of::as_set<Sequence>::type

Semantics: Convert a fusion sequence, seq, to a set.

Precondition: There may be no duplicate key types.

Header
#include <boost/fusion/container/set/convert.hpp>
#include <boost/fusion/include/as_set.hpp>
Example
as_set(make_vector('x', 123, "hello"))

PrevUpHomeNext