PrevUpHomeNext

Function template from

boost::pipeline::from

Synopsis

// In header: <boost/pipeline/pipeline.hpp>


template<typename T, typename Callable> 
  unspecified from(const Callable & generator);

Description

Creates a segment operating on items produced by a generator function.

The generator function receives a queue_back<T> argument and feeds it with the generated items. The underlying queue will be automatically closed upon return of the generator.

This overload accepts lambdas, bind expressions and functors.

To deduce the value_type of the generator, a hint might be required:

from<int>([](queue_back<int>& qb) {...});

TODO lambda and functor should not require a hint.

Parameters:

generator

A callable which is receiving a single queue_back<T> argument.

Returns:

segment<terminated, T>


PrevUpHomeNext