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

Function storage_t

01.24-optional0/main.cpp:11–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 aligned_storage_t data;
10
11 storage_t() = default;
12
13 T* as() { return reinterpret_cast<T*>(&data); }
14 // 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