[libcxx-commits] [libcxx] [libc++][chrono] Implement LWG 4274: Allow chrono::hh_mm_ss to be constructed from unsigned durations (PR #209686)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 26 08:28:26 PDT 2026


https://github.com/frederick-vs-ja approved this pull request.

I dropped most of the original PR description because IMO these parts were mostly duplicate of the official description of LWG4274. Please double check the changes.

> * This may incorrectly treat a custom signed type as unsigned. `is_unsigned_v` provides a compile-time path for unsigned types, while the sign check keeps signed and custom types correct.

It's questionable whether a signed user-defined representation type `R` with `numeric_limits<R>::is_signed` being `false` is valid for `duration`. I guess it's better to rephrase this part.

`is_unsigned_v` is fine to me. No change requested for this.

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


More information about the libcxx-commits mailing list