qt6-bb10/tests/auto/corelib/time/qdate
Ivan Solovev c4f7dba81e QDate: make conversion from/to chrono types constexpr and noexcept
Add method stdSysDaysToJulianDay(), which implements the conversion
from std::chrono::sys_days to Julian Day in a constexpr and noexcept
manner. Use it in the fromStdSysDays() method instead of addDays(),
and also in all constructors from std::chrono types.
This allows all constructors to be constexpr and noexcept.

Simplify toStdSysDays() so that it could also be constexpr and
noexcept.

Add compile-time roundtrip tests between QDate and std::chrono types.

Fixes: QTBUG-118221
Change-Id: Id35a669430162f1932ad8d28b553af2fd7f5c6de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-30 21:25:34 +02:00
..
.gitignore
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qdate.cpp QDate: make conversion from/to chrono types constexpr and noexcept 2023-10-30 21:25:34 +02:00