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

Function main

01.29-optional4/main.cpp:85–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 not std::is_trivially_destructible_v<Not_TriviallyDestructible>);
84
85int main()
86{
87#if not defined(__clang__) && not defined(_MSC_VER) && \
88 not(defined(__GNUC__) && !defined(__clang__))
89 static_assert(
90 not std::is_copy_constructible_v<optional<NotCopyable>>);
91 static_assert(std::is_copy_constructible_v<optional<int>>);
92
93 static_assert(not std::is_trivially_destructible_v<
94 optional<Not_TriviallyDestructible>>);
95 static_assert(std::is_trivially_destructible_v<optional<int>>);
96
97 optional<Not_TriviallyDestructible> no{};
98 optional<COMLike> o{};
99
100#else
101# pragma message("not supported")
102#endif
103}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected