proxygen
folly::pushmi::reduce_fn Struct Reference

#include <reduce.h>

Classes

struct  fn
 
struct  identity
 

Public Member Functions

template<class ExecutionPolicy , class ForwardIt , class T , class BinaryOp >
T operator() (ExecutionPolicy &&policy, ForwardIt begin, ForwardIt end, T init, BinaryOp binary_op) const
 

Detailed Description

Definition at line 25 of file reduce.h.

Member Function Documentation

template<class ExecutionPolicy , class ForwardIt , class T , class BinaryOp >
T folly::pushmi::reduce_fn::operator() ( ExecutionPolicy &&  policy,
ForwardIt  begin,
ForwardIt  end,
T  init,
BinaryOp  binary_op 
) const
inline

Definition at line 44 of file reduce.h.

References folly::test::begin(), folly::pushmi::operators::bulk, folly::test::end(), folly::pushmi::operators::just, folly::gen::move, and folly::pushmi::reduce.

49  {
50  return operators::just(std::move(init)) |
52  fn<BinaryOp>{binary_op},
53  begin,
54  end,
55  policy,
56  identity{},
57  identity{}) |
58  operators::get<T>;
59  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
auto begin(TestAdlIterable &instance)
Definition: ForeachTest.cpp:56
void init(int *argc, char ***argv, bool removeFlags)
Definition: Init.cpp:34
auto end(TestAdlIterable &instance)
Definition: ForeachTest.cpp:62
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::operators::bulk_fn bulk
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::operators::just_fn just

The documentation for this struct was generated from the following file: