[llvm-branch-commits] [libcxx] [libc++][TZDB] Implements time_zone::to_sys. (PR #90394)

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 4 08:56:49 PDT 2024


================
@@ -70,6 +72,30 @@ class _LIBCPP_AVAILABILITY_TZDB time_zone {
     return __get_info(chrono::time_point_cast<seconds>(__time));
   }
 
+  // Since the interface promisses throwing, don't add nodiscard.
----------------
ldionne wrote:

I don't think this comment is necessary -- we assume no `nodiscard` by default anyway, and I think anyone pausing to think whether this should be made `nodiscard` will easily come to the same conclusion.

Or if you want to keep the comment, I would reword to `We don't apply nodiscard here since this function throws on many inputs, so it could be used as a validation`.

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


More information about the llvm-branch-commits mailing list