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

Function main

01.32-optional5/main.cpp:94–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 Not_TriviallyDestructible>);
93
94int main()
95{
96 static_assert(
97 not std::is_copy_constructible_v<optional<NotCopyable>>);
98 static_assert(std::is_copy_constructible_v<optional<int>>);
99
100 static_assert(not std::is_trivially_destructible_v<
101 optional<Not_TriviallyDestructible>>);
102 static_assert(
103 std::is_trivially_destructible_v<optional<int>>);
104
105 optional<Not_TriviallyDestructible> no{};
106 optional<COMLike> o{};
107}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected