[llvm-branch-commits] [libcxx] [libc++][chrono] Completes the tzdb	class. (PR #82157)
    Louis Dionne via llvm-branch-commits 
    llvm-branch-commits at lists.llvm.org
       
    Tue Mar  5 09:47:53 PST 2024
    
    
  
================
@@ -43,6 +44,40 @@ struct tzdb {
   vector<time_zone_link> links;
 
   vector<leap_second> leap_seconds;
+
+  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI const time_zone* __locate_zone(string_view __name) const {
+    if (const time_zone* __result = __find_in_zone(__name); __result)
+      return __result;
+
+    if (auto __it = ranges::lower_bound(links, __name, {}, &time_zone_link::name);
+        __it != links.end() && __it->name() == __name)
+      if (const time_zone* __result = __find_in_zone(__it->target()); __result)
----------------
ldionne wrote:
```suggestion
      if (const time_zone* __result = __find_in_zone(__it->target()))
```
https://github.com/llvm/llvm-project/pull/82157
    
    
More information about the llvm-branch-commits
mailing list