On Tue, 23 Sept 2025 at 07:07, Tomasz Kamiński <[email protected]> wrote:
>
> This patch removes the __formatter_chrono<_CharT> base class from the
> formatters for utc_time, gps_time, and tai_time. These formatters
> were using the __formatter_duration<_CharT> member but not the base class,
> so removing the base class reduces the overall size of the formatters.
>
> libstdc++-v3/ChangeLog:
>
>         * include/bits/chrono_io.h (formatter<chrono::utc_time, _CharT>):
>         (formatter<chrono::gps_time<_Duration>, _CharT>)
>         (formatter<chrono::tai_time<_Duration>, _CharT): Remove
>         __fromatter_chrono base class.

"fromatter" -> "formatter"

OK with that change

>
> Signed-off-by: Tomasz Kamiński <[email protected]>
> ---
> The problem prexisted before the refactoring in r16-1709-g4b3cefed1a0834
> We should fix that before calling ABI stable. I was going to commit this
> directly.
>
> Tested on x86_64-linux. OK for trunk?
>
>  libstdc++-v3/include/bits/chrono_io.h | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/libstdc++-v3/include/bits/chrono_io.h 
> b/libstdc++-v3/include/bits/chrono_io.h
> index ff7e8cfe6b9..85b2013cf70 100644
> --- a/libstdc++-v3/include/bits/chrono_io.h
> +++ b/libstdc++-v3/include/bits/chrono_io.h
> @@ -2958,7 +2958,6 @@ namespace __format
>
>    template<typename _Duration, __format::__char _CharT>
>      struct formatter<chrono::utc_time<_Duration>, _CharT>
> -    : __format::__formatter_chrono<_CharT>
>      {
>        constexpr typename basic_format_parse_context<_CharT>::iterator
>        parse(basic_format_parse_context<_CharT>& __pc)
> @@ -3003,7 +3002,6 @@ namespace __format
>
>    template<typename _Duration, __format::__char _CharT>
>      struct formatter<chrono::tai_time<_Duration>, _CharT>
> -    : __format::__formatter_chrono<_CharT>
>      {
>        constexpr typename basic_format_parse_context<_CharT>::iterator
>        parse(basic_format_parse_context<_CharT>& __pc)
> @@ -3039,7 +3037,6 @@ namespace __format
>
>    template<typename _Duration, __format::__char _CharT>
>      struct formatter<chrono::gps_time<_Duration>, _CharT>
> -    : __format::__formatter_chrono<_CharT>
>      {
>        constexpr typename basic_format_parse_context<_CharT>::iterator
>        parse(basic_format_parse_context<_CharT>& __pc)
> --
> 2.51.0
>
>

Reply via email to