MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / functor_with_unique_ptr

Class functor_with_unique_ptr

test/source/tests/task_tests.cpp:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 class functor_with_unique_ptr {
102 private:
103 std::unique_ptr<int> up;
104
105 public:
106 functor_with_unique_ptr() : up(std::make_unique<int>(12345)) {}
107 functor_with_unique_ptr(functor_with_unique_ptr&& rhs) noexcept = default;
108
109 int operator()() noexcept {
110 assert(static_cast<bool>(up));
111 return *up;
112 }
113 };
114
115 struct trivially_copiable_destructable {
116 int operator()() const {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected