[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
Thu May 7 23:59:12 PDT 2026


Zingam wrote:

> Should be good now, sorry for the wrong location of the tests. Also formatted the files appropriately :)

AFAIK We have a particular naming scheme based on the names of the sections in the standard https://wg21.link/draft which may not be obvious to the uninitiated. We also tend to have a test file for each function. (Of course this is not as simple as style has changed over the years but we must adhere to the latest best practices for new code).

I only glossed over this Patch but I see that https://wg21.link/lwg3260 touches many sections, so the test cases must be spread over multiple test files: members vs nonmembers, ym vs ymd. Please make sure you put them in the appropriate places. The test file names should give you an idea but also each file should contain a synopsis of what is it testing.

For example this is the synopsis for the year-month non-member operator- https://github.com/llvm/llvm-project/blob/c4366f7b70fd22485f9d8acd79062cdc37b6dea2/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp#L23



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


More information about the libcxx-commits mailing list