[Bug c++/96311] false positive for -Wunused-but-set-variable (const/constexpr identifier used in generic lambda)

tilkax at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 27 07:40:37 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96311

--- Comment #2 from Tillmann Karras <tilkax at gmail dot com> ---
(In reply to Martin Liška from comment #1)
> Confirmed, but it seems the code is rejected with clang:
> [...]
> Is it a valid test-case?

I think so.

There is a bug report for Clang: https://bugs.llvm.org/show_bug.cgi?id=25627
And MSVC used to have the same problem:
https://developercommunity.visualstudio.com/content/problem/367326/problems-with-capturing-constexpr-in-lambda.html


More information about the Gcc-bugs mailing list