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

Class SharedCountFunctor

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

Functor which returns it's shared count

Source from the content-addressed store, hash-verified

35
36/// Functor which returns it's shared count
37class SharedCountFunctor {
38 std::shared_ptr<std::size_t> state = std::make_shared<std::size_t>(0);
39
40public:
41 std::size_t operator()() const {
42 return state.use_count();
43 }
44};
45} // namespace
46
47ALL_LEFT_RIGHT_TYPED_TEST_CASE(AllMoveAssignConstructTests)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected