[gcc r16-7989] libstdc++: Add comment to chrono::hh_mm_ss constructor for LWG 4274

Jonathan Wakely redi@gcc.gnu.org
Tue Mar 10 18:23:24 GMT 2026


https://gcc.gnu.org/g:2f34d5c5df1d0382240574d68a499265ed96dbab

commit r16-7989-g2f34d5c5df1d0382240574d68a499265ed96dbab
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Mar 10 15:44:48 2026 +0000

    libstdc++: Add comment to chrono::hh_mm_ss constructor for LWG 4274
    
    LWG 4274 was approved in Kona 2025 but I implemented the resolution back
    in 2023 for PR libstdc++/108265. This just adds a comment noting that we
    implement the resolution.
    
    libstdc++-v3/ChangeLog:
    
            * include/std/chrono (hh_mm_ss): Add comment about LWG 4274.

Diff:
---
 libstdc++-v3/include/std/chrono | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono
index ef4f7a3fdefa..573bcfc7c4bc 100644
--- a/libstdc++-v3/include/std/chrono
+++ b/libstdc++-v3/include/std/chrono
@@ -2361,6 +2361,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 	    _M_ss._M_r = duration_cast<precision>(__ss).count();
 	}
 
+	// _GLIBCXX_RESOLVE_LIB_DEFECTS
+	// 4274. hh_mm_ss constructor is ill-formed for unsigned durations
 	static constexpr _Duration
 	_S_abs(_Duration __d)
 	{


More information about the Libstdc++-cvs mailing list