Skip to content

Split up glaze/json/generic.hpp#2560

Merged
stephenberry merged 3 commits into
stephenberry:mainfrom
makekryl:split-generic-header
May 16, 2026
Merged

Split up glaze/json/generic.hpp#2560
stephenberry merged 3 commits into
stephenberry:mainfrom
makekryl:split-generic-header

Conversation

@makekryl
Copy link
Copy Markdown
Contributor

No description provided.

@makekryl makekryl force-pushed the split-generic-header branch from 420da2d to 4af169b Compare May 11, 2026 12:06
@stephenberry
Copy link
Copy Markdown
Owner

Thanks for this! I'm pretty busy right now, but I'll check it over and try to get it merged soon.

The push of warning 4456 lived in generic_def.hpp but the matching pop
was in generic.hpp, so including generic_def.hpp standalone (the
documented use case for forward-declaring generic in public headers)
leaked the disabled warning into the rest of the translation unit.
Parallels the existing glaze/forward.hpp convention: both headers
exist so that widely-included user code can reference Glaze types
without pulling in read/write machinery, with full inclusion deferred
to the TUs that actually serialize.

The documentation now lists which operations work with the
lightweight header versus which require the full glaze/json/generic.hpp,
and shows the intended public-header / .cpp split as a worked example.
A cross-reference is added in glaze/forward.hpp so users discovering
one of the two paired headers can find the other.
@stephenberry
Copy link
Copy Markdown
Owner

I renamed to "generic_fwd.hpp" and fixed an MSVC macro issue, but it looks good, so I'm merging now.

@stephenberry stephenberry merged commit 7d3f588 into stephenberry:main May 16, 2026
51 checks passed
@makekryl
Copy link
Copy Markdown
Contributor Author

makekryl commented May 16, 2026

Sorry, I totally forgot about the macro

Thank you!

@stephenberry
Copy link
Copy Markdown
Owner

No problem, thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants