[libcxx-commits] [PATCH] D92730: [libc++] [LWG3221] Add tests for wrapping operator+(year_month, months).

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Dec 6 23:41:53 PST 2020


curdeius added inline comments.


================
Comment at: libcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp:38-52
+constexpr bool testConstexprYears(std::chrono::year_month ym) {
+  years offset{23};
+  assert(static_cast<int>((ym).year()) == 1);
+  assert(static_cast<int>((ym + offset).year()) == 24);
+  assert(static_cast<int>((offset + ym).year()) == 24);
+  return true;
+}
----------------
Actually I should get rid of these two, since I test the whole `test()` now in constexpr context. WDYT?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92730/new/

https://reviews.llvm.org/D92730



More information about the libcxx-commits mailing list