@@ -3101,6 +3101,14 @@ inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(co
3101
3101
_LIBCUDACXX_INLINE_VISIBILITY
3102
3102
inline constexpr year_month_weekday_last& year_month_weekday_last::operator -=(const years& __dy) noexcept { *this = *this - __dy; return *this ; }
3103
3103
3104
+ _LIBCUDACXX_NODISCARD_ATTRIBUTE inline _LIBCUDACXX_INLINE_VISIBILITY
3105
+ constexpr unsigned __hh_mm_ss_width (uint64_t __n, uint64_t __d = 10 , unsigned __w = 0 )
3106
+ {
3107
+ if (__n >= 2 && __d != 0 && __w < 19 )
3108
+ return 1 + __hh_mm_ss_width (__n, __d % __n * 10 , __w+1 );
3109
+ return 0 ;
3110
+ }
3111
+
3104
3112
template <class _Duration >
3105
3113
class hh_mm_ss
3106
3114
{
@@ -3116,18 +3124,9 @@ private:
3116
3124
__ret *= 10U ;
3117
3125
return __ret;
3118
3126
}
3119
-
3120
- _LIBCUDACXX_INLINE_VISIBILITY
3121
- static constexpr unsigned __width (uint64_t __n, uint64_t __d = 10 , unsigned __w = 0 )
3122
- {
3123
- if (__n >= 2 && __d != 0 && __w < 19 )
3124
- return 1 + __width (__n, __d % __n * 10 , __w+1 );
3125
- return 0 ;
3126
- }
3127
-
3128
3127
public:
3129
- static unsigned constexpr fractional_width = __width (__CommonType::period::den) < 19 ?
3130
- __width (__CommonType::period::den) : 6u ;
3128
+ static unsigned constexpr fractional_width = __hh_mm_ss_width (__CommonType::period::den) < 19 ?
3129
+ __hh_mm_ss_width (__CommonType::period::den) : 6u ;
3131
3130
using precision = duration<typename __CommonType::rep, ratio<1 , __pow10(fractional_width)>>;
3132
3131
3133
3132
_LIBCUDACXX_INLINE_VISIBILITY
0 commit comments