Am Fr., 13. Juni 2025 um 09:33 Uhr schrieb Tomasz Kamiński <
tkami...@redhat.com>:

> As pointed out by Daniel Krügler we do not need to use reserved name
> in tests.
>
> libstdc++-v3/ChangeLog:
>
>         * testsuite/23_containers/vector/bool/format.cc: Replaced _CharT
>         with CharT.
>         * testsuite/std/format/debug.cc: Likewise.
>         * testsuite/std/format/ranges/adaptors.cc: Likewise.
>         * testsuite/std/format/ranges/formatter.cc: Likewise.
>         * testsuite/std/format/ranges/map.cc: Likewise.
>         * testsuite/std/format/ranges/sequence.cc: Likewise.
>         * testsuite/std/format/ranges/string.cc: Likewise.
>         * testsuite/std/format/tuple.cc: Likewise.
>         * testsuite/std/time/format/empty_spec.cc: Likewise.
>         * testsuite/std/time/format/pr120114.cc: Likewise.
>         * testsuite/std/time/format/pr120481.cc: Likewise.
>         * testsuite/std/time/format/precision.cc: Likewise.
> ---
> Tested on x86_64-linux. Pushed to trunk.
>
>  .../23_containers/vector/bool/format.cc       |   6 +-
>  libstdc++-v3/testsuite/std/format/debug.cc    |  74 ++++++------
>  .../testsuite/std/format/ranges/adaptors.cc   |  22 ++--
>  .../testsuite/std/format/ranges/formatter.cc  |  13 +-
>  .../testsuite/std/format/ranges/map.cc        |   8 +-
>  .../testsuite/std/format/ranges/sequence.cc   |   8 +-
>  .../testsuite/std/format/ranges/string.cc     |  12 +-
>  libstdc++-v3/testsuite/std/format/tuple.cc    |  25 ++--
>  .../testsuite/std/time/format/empty_spec.cc   | 112 +++++++++---------
>  .../testsuite/std/time/format/pr120114.cc     |  20 ++--
>  .../testsuite/std/time/format/pr120481.cc     |  26 ++--
>  .../testsuite/std/time/format/precision.cc    |  14 +--
>  12 files changed, 169 insertions(+), 171 deletions(-)
>
> diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/format.cc
> b/libstdc++-v3/testsuite/23_containers/vector/bool/format.cc
> index eb24b66d82e..cecc535f15f 100644
> --- a/libstdc++-v3/testsuite/23_containers/vector/bool/format.cc
> +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/format.cc
> @@ -21,7 +21,7 @@ is_format_string_for(const char* str, Args&&... args)
>  }
>
>
LGTM


>  #define WIDEN_(C, S) ::std::__format::_Widen<C>(S, L##S)
> -#define WIDEN(S) WIDEN_(_CharT, S)
> +#define WIDEN(S) WIDEN_(CharT, S)
>
>  void
>  test_format_string()
> @@ -34,11 +34,11 @@ test_format_string()
>    VERIFY( !is_format_string_for("{:{}}", v[0], 1.0f) );
>  }
>
> -template<typename _CharT>
> +template<typename CharT>
>  void
>  test_output()
>  {
> -  std::basic_string<_CharT> res;
> +  std::basic_string<CharT> res;
>    size_t size = 0;
>    std::vector<bool> v{true, false};
>
>
[..]


>
>  #define WIDEN_(C, S) ::std::__format::_Widen<C>(S, L##S)
> -#define WIDEN(S) WIDEN_(_CharT, S)
> +#define WIDEN(S) WIDEN_(CharT, S)
>
>  template<typename T,
>          template<typename, typename> class Formatter =
> std::range_formatter>
> @@ -22,7 +22,6 @@ struct std::formatter<MyVector<T, Formatter>, CharT>
>  {
>    constexpr formatter() noexcept
>    {
> -    using _CharT = CharT;
>

This strike is a very nice side effect of that change.

 Thanks,

- Daniel

Reply via email to