Skip to content

Deprecate std_variant.hpp and remove variant2.hpp - #379

Merged
gennaroprota merged 1 commit into
developfrom
fix/remove_or_deprecate_superseded_variant_headers
Aug 14, 2026
Merged

Deprecate std_variant.hpp and remove variant2.hpp#379
gennaroprota merged 1 commit into
developfrom
fix/remove_or_deprecate_superseded_variant_headers

Conversation

@gennaroprota

Copy link
Copy Markdown
Collaborator

Support for boost::variant, boost::variant2::variant and std::variant has moved to variant.hpp.

std_variant.hpp still compiled on its own, so it stays as a deprecated forwarding header.

variant2.hpp cannot have a working user: it declared a partial specialization whose argument list is identical to the primary template, which is ill-formed. It has been that way since 897dec4, the commit which gave variant.hpp its own variant2 support. So we remove it.

Support for `boost::variant`, `boost::variant2::variant` and
`std::variant` has moved to variant.hpp.

std_variant.hpp still compiled on its own, so it stays as a deprecated
forwarding header.

variant2.hpp could not have a working user: it declared a partial
specialization whose argument list is identical to the primary template,
which is ill-formed.  It has been that way since 897dec4, the commit
which gave `variant.hpp` its own variant2 support. So we remove it.
@gennaroprota
gennaroprota force-pushed the fix/remove_or_deprecate_superseded_variant_headers branch from f44aa04 to 150cb8d Compare August 13, 2026 15:31
@gennaroprota
gennaroprota added this pull request to the merge queue Aug 14, 2026
Merged via the queue into develop with commit 1837120 Aug 14, 2026
43 checks passed
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.

1 participant