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

Method as

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

Source from the content-addressed store, hash-verified

51 storage_t() = default;
52
53 T* as() { return reinterpret_cast<T*>(&data); }
54 // use placement new to create an instance of T inside this
55 // union
56 };

Callers 1

~optionalMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected