[clang] [clang] Explain why std::is_integral is not satisfied (PR #235416)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 25 19:55:56 PDT 2026


================
@@ -590,4 +613,28 @@ void test() {
     // expected-note@#concept10 {{'void' is not aggregate}} \
     // expected-note@#concept10 {{because it is a cv void type}}
 }
+    static_assert(std::is_integral<double>::value);
+    // expected-error-re at -1 {{static assertion failed due to requirement 'std::{{.*}}is_integral<double>::value'}} \
+    // expected-note at -1 {{'double' is not an integral type}} \
+    // expected-note at -1 {{because it is a floating-point type}}
----------------
zyn0217 wrote:

This looks verbose, can we simply say

`'double' is a floating-point type, not an integral type` ?


https://github.com/llvm/llvm-project/pull/235416


More information about the cfe-commits mailing list