You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old HDF5 compound type engine — h5::dt_t / h5::register_struct() / H5CPP_REGISTER_STRUCT — should be deprecated (not removed) once the updated
compiler plugin (vargalabs/h5cpp-compiler#9) generates compiler_meta_t + is_reflected_compound_t specializations instead.
Rationale for deprecation over removal: Three legitimate user populations cannot
or will not use the compiler plugin: cross-compilation targets, MSVC-only shops, and
users with hand-crafted dt_t specializations for third-party or ABI-stable types.
The resolved_type_t<T> fallback branch (introduced in #89) is a zero-cost if constexpr dead branch for new-engine types — keeping it has no runtime overhead
and preserves a valid migration path.
Background
Issue #87 introduced the new type engine (storage_traits_t::create_type()) in H5Tmeta.hpp. Issue #89 wired it into the I/O path via resolved_type_t<T>, which
prefers the new engine but falls back to h5::dt_t for types not yet migrated.
That fallback should remain permanently as a compatibility opt-out, not be removed.
What must stay (never remove)
H5CPP_REGISTER_TYPE_ macro and dt_t<T> specializations for primitive types
(int, float, etc.) — the new engine calls H5T_NATIVE_* handles which are still
registered via this path.
The else branch in resolved_type_t<T>::resolved_type_t() — zero cost, enables
opt-out for users without the compiler plugin.
Work
Mark H5CPP_REGISTER_STRUCT with a deprecation notice (comment + docs); keep the macro
Mark h5::register_struct() with [[deprecated]]; keep the declaration and default body
Update documentation to direct new users to the compiler plugin path
Do not remove dt_t<T> fallback from resolved_type_t (it is permanent compat shim)
Do not remove H5CPP_REGISTER_TYPE_ or primitive dt_t specializations
Verify all existing tests remain green; add a test confirming the fallback path still
works for a hand-registered type (no compiler plugin)
Preconditions — all three must be met before this issue can be worked
Summary
The old HDF5 compound type engine —
h5::dt_t/h5::register_struct()/H5CPP_REGISTER_STRUCT— should be deprecated (not removed) once the updatedcompiler plugin (vargalabs/h5cpp-compiler#9) generates
compiler_meta_t+is_reflected_compound_tspecializations instead.Rationale for deprecation over removal: Three legitimate user populations cannot
or will not use the compiler plugin: cross-compilation targets, MSVC-only shops, and
users with hand-crafted
dt_tspecializations for third-party or ABI-stable types.The
resolved_type_t<T>fallback branch (introduced in #89) is a zero-costif constexprdead branch for new-engine types — keeping it has no runtime overheadand preserves a valid migration path.
Background
Issue #87 introduced the new type engine (
storage_traits_t::create_type()) inH5Tmeta.hpp. Issue #89 wired it into the I/O path viaresolved_type_t<T>, whichprefers the new engine but falls back to
h5::dt_tfor types not yet migrated.That fallback should remain permanently as a compatibility opt-out, not be removed.
What must stay (never remove)
H5CPP_REGISTER_TYPE_macro anddt_t<T>specializations for primitive types(int, float, etc.) — the new engine calls
H5T_NATIVE_*handles which are stillregistered via this path.
elsebranch inresolved_type_t<T>::resolved_type_t()— zero cost, enablesopt-out for users without the compiler plugin.
Work
H5CPP_REGISTER_STRUCTwith a deprecation notice (comment + docs); keep the macroh5::register_struct()with[[deprecated]]; keep the declaration and default bodydt_t<T>fallback fromresolved_type_t(it is permanent compat shim)H5CPP_REGISTER_TYPE_or primitivedt_tspecializationsworks for a hand-registered type (no compiler plugin)
Preconditions — all three must be met before this issue can be worked
compiler_meta_toutputDepends on