|
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.
|
Macro-based POD helper utilities. More...
Go to the source code of this file.
Macros | |
| #define | JH_POD_STRUCT(NAME, ...) |
Declares a strict POD struct with operator== and enforces POD constraints at compile time. | |
| #define | JH_ASSERT_POD_LIKE(TYPE) |
Compile-time assertion to ensure a type is POD-like, according to jh::pod::pod_like. | |
Macro-based POD helper utilities.
This header provides compile-time helper macros for defining and validating POD-compatible structures. It no longer includes transitional tuple utilities.
JH_POD_STRUCT โ Declare a POD struct with operator== and automatic pod_like validation. JH_ASSERT_POD_LIKE โ Verify a manually defined type satisfies jh::pod::pod_like constraints. tools.h only contains macro-based helpers. jh::pod::tuple (available in 1.3.0-1.3.3) was removed and replaced with a full implementation in <jh/pods/tuple.h>. jh/pods/tuple.h) | #define JH_ASSERT_POD_LIKE | ( | TYPE | ) |
Compile-time assertion to ensure a type is POD-like, according to jh::pod::pod_like.
Use this macro if you're writing your own struct (not using JH_POD_STRUCT) but still want to ensure compatibility with POD-only containers (like pod_stack).
This will emit a compile-time error if the type is not:
| #define JH_POD_STRUCT | ( | NAME, | |
| ... ) |
Declares a strict POD struct with operator== and enforces POD constraints at compile time.
| NAME | The name of the struct to define. |
| ... | The member declarations of the struct. |
pod_like type. operator== is auto-generated (= default). std::string or unique_ptr), it triggers a compile-time error.