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

Class internal_capacity_holder

include/function2/function2.hpp:1102–1126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100
1101template <typename Capacity>
1102class internal_capacity_holder {
1103 // Tag to access the structure in a type-safe way
1104 typename internal_capacity<Capacity>::type storage_;
1105
1106public:
1107 constexpr internal_capacity_holder() = default;
1108
1109 FU2_DETAIL_CXX14_CONSTEXPR data_accessor* opaque_ptr() noexcept {
1110 return &storage_.accessor_;
1111 }
1112 constexpr data_accessor const* opaque_ptr() const noexcept {
1113 return &storage_.accessor_;
1114 }
1115 FU2_DETAIL_CXX14_CONSTEXPR data_accessor volatile*
1116 opaque_ptr() volatile noexcept {
1117 return &storage_.accessor_;
1118 }
1119 constexpr data_accessor const volatile* opaque_ptr() const volatile noexcept {
1120 return &storage_.accessor_;
1121 }
1122
1123 static constexpr std::size_t capacity() noexcept {
1124 return sizeof(storage_);
1125 }
1126};
1127
1128/// An owning erasure
1129template <bool IsOwning /* = true*/, typename Config, typename Property>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected