[libcxx-commits] [libcxx] [libc++][chrono] Adds the sys_info class. (PR #85619)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 7 08:36:49 PDT 2024


================
@@ -55,10 +58,18 @@ class _LIBCPP_AVAILABILITY_TZDB time_zone {
 
   _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI string_view name() const noexcept { return __name(); }
 
+  template <class _Duration>
+  _LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI sys_info get_info(const sys_time<_Duration>& __time) const {
+    return __get_info(chrono::time_point_cast<seconds>(__time));
----------------
EricWF wrote:

Can we think about the overflow here?

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


More information about the libcxx-commits mailing list