MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / NotCopyable

Class NotCopyable

01.24-optional0/main.cpp:40–43  ·  view source on GitHub ↗

#A A struct with delete copy operations

Source from the content-addressed store, hash-verified

38
39// #A A struct with delete copy operations
40struct NotCopyable {
41 NotCopyable(const NotCopyable&) = delete;
42 NotCopyable& operator=(const NotCopyable&) = delete;
43};
44
45optional<NotCopyable> a{};
46optional<NotCopyable> b = a; // #B This should fail

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected