From d5c7f460aa7300b0672f26752fdc38d0e48b3e5c Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 7 Apr 2026 09:57:01 +0800 Subject: [PATCH] Implement LWG-4481 --- stl/inc/__msvc_chrono.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stl/inc/__msvc_chrono.hpp b/stl/inc/__msvc_chrono.hpp index b4368dd9530..0dbf8104187 100644 --- a/stl/inc/__msvc_chrono.hpp +++ b/stl/inc/__msvc_chrono.hpp @@ -114,6 +114,8 @@ namespace chrono { using rep = _Rep; using period = typename _Period::type; + static_assert(!is_const_v<_Rep>, "rep type of duration must not be a const type"); + static_assert(!is_volatile_v<_Rep>, "rep type of duration must not be a volatile type"); static_assert(!_Is_duration_v<_Rep>, "duration can't have duration as first template argument"); static_assert(_Is_ratio_v<_Period>, "period not an instance of std::ratio"); static_assert(0 < _Period::num, "period negative or zero");