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

Function as

01.28-optional3/main.cpp:14–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 storage_t() = default;
13
14 T* as() { return reinterpret_cast<T*>(&data); }
15 // use placement new to create an instance of T inside this
16 // union
17};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected