proxygen
|
#include <Base-inl.h>
Public Member Functions | |
CollectTemplate ()=default | |
template<class Value , class Source , class StorageType = typename std::decay<Value>::type, class Collection = Container<StorageType, Allocator<StorageType>>> | |
Collection | compose (const GenImpl< Value, Source > &source) const |
Public Member Functions inherited from folly::gen::Operator< CollectTemplate< Container, Allocator > > | |
ResultGen | compose (const GenImpl< Value, Source > &source) const |
Public Member Functions inherited from folly::gen::FBounded< Self > | |
const Self & | self () const |
Self & | self () |
Additional Inherited Members | |
Protected Member Functions inherited from folly::gen::Operator< CollectTemplate< Container, Allocator > > | |
Operator ()=default | |
Operator (Operator &&) noexcept=default | |
Operator (const Operator &)=default | |
Operator & | operator= (Operator &&) noexcept=default |
Operator & | operator= (const Operator &)=default |
CollectTemplate - For collecting values from a source in a collection constructed using the specified template type. Given the type of values produced by the given generator, the collection type will be: Container<Value, Allocator<Value>>
The allocator defaults to std::allocator, so this may be used for the STL containers by simply using operators like 'as<set>', 'as<deque>', 'as<vector>'. 'as', here is the helper method which is the usual means of constructing this operator.
Example:
set<string> uniqueNames = from(names) | as<set>();
Definition at line 2331 of file Base-inl.h.
|
default |
|
inline |