MCPcopy Create free account
hub / github.com/Naios/function2 / internal_capacity

Class internal_capacity

include/function2/function2.hpp:1081–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1079/// control and vtable.
1080template <typename Capacity, typename = void>
1081struct internal_capacity {
1082 /// We extend the union through a technique similar to the tail object hack
1083 typedef union {
1084 /// Tag to access the structure in a type-safe way
1085 data_accessor accessor_;
1086 /// The internal capacity we use to allocate in-place
1087 struct alignas(Capacity::alignment) {
1088 unsigned char data[Capacity::capacity];
1089 } capacity_;
1090 } type;
1091};
1092template <typename Capacity>
1093struct internal_capacity<
1094 Capacity, std::enable_if_t<(Capacity::capacity < sizeof(void*))>> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected