[libcxx-commits] [libcxx] [libc++] LWG3260: year_month* arithmetic rejects durations convertible to years (PR #196384)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sat May 9 06:15:51 PDT 2026


================
@@ -49,6 +52,26 @@ constexpr bool test() {
     assert((ym == year_month{year{2020}, month{4}}));
   }
 
+  { // Ambiguity test, defaults to year arithmetic
+    for(unsigned int i = 0; i < 10; i++){
+      year y{2011};
+      month m{i};
----------------
Zingam wrote:

This doesn't look formatted properly.

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


More information about the libcxx-commits mailing list