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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 7 09:45:37 PST 2020


Mordante 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;
+}
----------------
ldionne wrote:
> curdeius wrote:
> > Actually I should get rid of these two, since I test the whole `test()` now in constexpr context. WDYT?
> Agreed.
Good point. I agree.


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