Skip to content

refactor: drop redundant Overloaded deduction guide#18

Draft
smaheshwar-pltr wants to merge 1 commit into
mainfrom
cleanup/drop-overloaded-guide
Draft

refactor: drop redundant Overloaded deduction guide#18
smaheshwar-pltr wants to merge 1 commit into
mainfrom
cleanup/drop-overloaded-guide

Conversation

@smaheshwar-pltr

@smaheshwar-pltr smaheshwar-pltr commented Jun 27, 2026

Copy link
Copy Markdown
Owner

What

Remove the explicit deduction guide for the local Overloaded std::visit helper in struct_like_set.cc. The Overloaded struct and its four Overloaded{...} call sites are unchanged.

Why

Under C++20 aggregate CTAD (P1816 / P2082), Overloaded's template arguments are deduced directly from its aggregate initializer, making the hand-written deduction guide redundant. The project requires C++23 with a documented compiler floor (GCC 14+, Clang 18+, MSVC 2022+), all of which support aggregate CTAD for this pattern.

C++20 aggregate CTAD deduces Overloaded's template arguments from its
aggregate initializer, so the explicit deduction guide is no longer needed.
The project requires C++23 with a compiler floor (GCC 14+, Clang 18+,
MSVC 2022+) where aggregate CTAD is supported.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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