[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 28 03:52:33 PDT 2024
================
@@ -101,6 +101,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3)
#endif
} // namespace cwg2759
+#if __cplusplus >= 202002L
+namespace cwg2770 { // cwg2770: 20
+template<typename T>
+struct B {
+ static_assert(sizeof(T) == 1);
+ using type = int;
+};
+
+template<typename T>
+int f(T t, typename B<T>::type u) requires (sizeof t == 1);
----------------
Endilll wrote:
Using a `sizeof expression` form (without parentheses) seems rather peculiar to me. Is there a reason for this?
https://github.com/llvm/llvm-project/pull/102857
More information about the cfe-commits
mailing list