|
JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
|
POD-safe optional<T> with raw storage.
More...
#include "jh/pods/pod_like.h"#include <new>#include <cstddef>#include <cstring>#include <memory>Go to the source code of this file.
Classes | |
| struct | jh::pod::optional< T > |
| POD-compatible optional wrapper. More... | |
Namespaces | |
| namespace | jh::pod |
| Aggregated entry point for Plain-Old-Data and layout-stable value utilities. | |
Functions | |
| template<pod_like T> | |
| constexpr optional< T > | jh::pod::make_optional (const T &value) noexcept |
Construct an optional<T> with a value. | |
POD-safe optional<T> with raw storage.
pod_like required) pod::array, serialization, and mmap'd memory sizeof(optional<T>) == sizeof(T) + 1) std::optional, this type never runs constructors or destructors. reinterpret_cast/std::launder and therefore cannot be used in consteval contexts.