MCPcopy Create free account
hub / github.com/Naios/function2 / CopyableIncreasingCoroutine

Class CopyableIncreasingCoroutine

test/assign-and-constructible-test.cpp:24–34  ·  view source on GitHub ↗

Coroutine which increases it's return value by every call

Source from the content-addressed store, hash-verified

22
23/// Coroutine which increases it's return value by every call
24class CopyableIncreasingCoroutine {
25 std::size_t state = 0UL;
26
27public:
28 CopyableIncreasingCoroutine() {
29 }
30
31 std::size_t operator()() {
32 return state++;
33 }
34};
35
36/// Functor which returns it's shared count
37class SharedCountFunctor {

Callers 1

TYPED_TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TYPED_TESTFunction · 0.68