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

Method storage_t

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

Source from the content-addressed store, hash-verified

56 aligned_storage_t data;
57
58 storage_t() = default;
59
60 T* as() { return reinterpret_cast<T*>(&data); }
61 // use placement new to create an instance of T inside this union

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected