> You want to keep allowing this conversion?

I see no reason to disable it because it's not string-like but we should probably disallow s and ?s specifiers if code unit types don't match. One more question to SG16 I guess.

- Victor



On Wed, Jun 7, 2023 at 11:27 AM Mark de Wever <koraq@xs4all.nl> wrote:
On Wed, Jun 07, 2023 at 11:09:21AM -0700, Victor Zverovich via Lib-Ext wrote:
> OK, I finally found time to look into this in detail and now convinced that
> the correct solution is to update
> http://eel.is/c++draft/format#formatter.spec disabling all formatters
> listed there that may mix code unit types except for formatter<char,
> wchar_t>. Previously they were disabled implicitly but C++23 inadvertently
> enabled them. For example, we should disable
>
>   template<class traits, class Allocator>
>     struct formatter<basic_string<charT, traits, Allocator>, Char>;
>
> when Char is different from charT.

This indeed matches my conclusion for the minimal fix.

Only making that change does not prevent

  format(L"{}", vector{'H', 'i'}); // gives ['H', 'i']

since that uses

  formatter<char, wchar_t>

You want to keep allowing this conversion?

Cheers,
Mark