[libcxx-commits] [clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

Younan Zhang via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 28 04:12:54 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);
----------------
zyn0217 wrote:

No, @cor3ntin provides me with it in the above comment, and I just copy-pasted it.

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


More information about the libcxx-commits mailing list