Skip to content

fix: remove unnecessary body from swappability detection helper - #85

Merged
martinmoene merged 1 commit into
nonstd-lite:masterfrom
IuraHD:fix/swappability-helper-declaration
Sep 23, 2026
Merged

martinmoene merged 1 commit into
nonstd-lite:masterfrom
IuraHD:fix/swappability-helper-declaration

Conversation

@IuraHD

@IuraHD IuraHD commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

The is_nothrow_swappable detection helper has a non-void return type but an empty function body, as reported in #83. It is only referenced in an unevaluated decltype expression, so it needs a declaration rather than a definition. Replace the empty body with a semicolon, matching the adjacent detection helpers.

Fixes #83.

Validation: the existing test executable compiles and runs successfully with GCC 14 under C++98, C++11, C++14, C++17, and C++20, with return-type warnings treated as errors. This is a static-analysis cleanup; no runtime behavior change is intended.

Copilot AI lite review requested due to automatic review settings September 23, 2026 05:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@martinmoene
martinmoene merged commit 0528e54 into nonstd-lite:master Sep 23, 2026
8 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.

optional_lite::std17::detail::is_nothrow_swappable has a method returning non-void without a return statement

3 participants