Skip to content

CWG 2355 Deducing noexcept-specifiers - #162

Closed
cpplearner wants to merge 6 commits into
edgcpp:mainfrom
cpplearner:cwg2355
Closed

cpplearner wants to merge 6 commits into
edgcpp:mainfrom
cpplearner:cwg2355

Conversation

@cpplearner

Copy link
Copy Markdown
Contributor

The functionality has already been implemented (for g++ mode) in d86293c. This PR simply removes the flag to make it work in all modes.

@wchilders-nvidia

Copy link
Copy Markdown
Collaborator

Testing output looks like all improvements so far; we should be able to further verify and take care of updating the expected recordings if you're not able to.

@daveedvdv-nvidia

Copy link
Copy Markdown

The change looks good to me. Personal tests were okay (will need to update some).
This requires an issue number and a Changes entry.

@wchilders-nvidia

Copy link
Copy Markdown
Collaborator

I went ahead and gave this an issue tracking number: #197

@daveedvdv-nvidia

Copy link
Copy Markdown

Me, earlier:

The change looks good to me. Personal tests were okay (will need to update some).

I take that back: MSVC didn't implement that until very recently.
See https://godbolt.org/z/v67rKrPE9

So rather than removing the condition completely, make it dependent on ms_version_is(<1951).

Wyatt:

I went ahead and gave this an issue tracking number: #197

Thanks!

@cpplearner : Use that number for your Changes entry. It' might look something like:

10/1/26  [GH #197]
Deducing noexcept-specifiers

Previously, the front end emulated Clang and GCC's ability to deduce simple dependent
noexcept-specifiers (see the entry for EDGcpfe/18317 of 9/6/17).  Meanwhile, the standard
has been changed through Core issue 2355 to make that behavior standard-mandated.
It is now the default behavior, except in Microsoft mode with microsoft_version < 1951.

P.S.: Thanks for that contribution, @cpplearner — it may well turn out to be the first outside contribution to this project!

@cpplearner

Copy link
Copy Markdown
Contributor Author
  • Restore deduction_from_exc_spec_allowed and make it TRUE except when microsoft_version < 1951.
  • Add Changes entry, wording from @daveedvdv-nvidia .

@nv-cmeerw

Copy link
Copy Markdown
Contributor

Please add tests that show the change in the relevant configurations, i.e. GCC/Clang/Microsoft 19.50/Microsoft 19.51/standard mode for both C++14 and C++17. Probably just use tests/tests/cwg/2355a.sft.cpp with

//options:--c++17 -A:--c++17 --gn 160200:--c++17 --clang_version 230100:--ms_c++17 --microsoft_version 1950;fn:--ms_c++17 --microsoft_version 1951:--c++14 -A;fn:--c++14 --gn 160200;fn:--c++14 --clang_version 230100;fn:--ms_c++14 --microsoft_version 1950;fn:--ms_c++14 --microsoft_version 1951;fn
//options_all:-tused

Comment thread src/Changes Outdated
10/1/26 [GH #197]
Deducing noexcept-specifiers

Previously, the front end emulated Clang and GCC's ability to deduce simple dependent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lines should wrap at column 79 (there should be a git hook pointing that out)

@cpplearner

Copy link
Copy Markdown
Contributor Author
  • Make tests/tests/cwg/2355a.sft.cpp test relevant configurations.
  • Wrap lines in Changes to fit in 80 columns.
  • Remove the CWG 2355 tests from tests/expectations. These tests are no longer expected to FAIL.

@daveedvdv-nvidia

Copy link
Copy Markdown

Looks good to me — thanks!

@daveedvdv-nvidia daveedvdv-nvidia self-assigned this Oct 2, 2026
@daveedvdv-nvidia

Copy link
Copy Markdown

Merge with f0e30b6

@cpplearner
cpplearner deleted the cwg2355 branch October 7, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants