[clang] [Clang][Parser] Accept P2741R3 (static_assert with user-generated message) in C++11 as an extension (PR #102044)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 06:16:43 PDT 2024
erichkeane wrote:
@yashssh : We can take this offline (see slack), but Feature Test Macros are intended to change. The values listed in the standard are the 'minimum' value for a compiler that implemented every feature in the standard.
The expectation is that an implementation will use a number greater than that when implementing/enabling features from future standards. Since Clang is permitting this version of `static_assert` as an extension, it should be expected that the FTM is a value that would match.
In this case, the Perennial test has an incorrect assumption, and, comparing a FTM with an equality comparison is actually contrary to how it is intended to be used(it should be `>=`, since the point is, "did you implement this one component of this feature that I want, or better?").
https://github.com/llvm/llvm-project/pull/102044
More information about the cfe-commits
mailing list