Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andreasfertig/programming-with-cpp20
/ ~optional
Method
~optional
01.28-optional3/main.cpp:26–30 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
24
// doesn't matter
25
26
~optional()
27
requires(not std::is_trivially_destructible_v<T>)
28
{
29
if(has_value) { value.as()->~T(); }
30
}
31
32
~optional() = default;
33
Callers
nothing calls this directly
Calls
1
as
Method · 0.45
Tested by
no test coverage detected