C++ Logo

sg16

Advanced search

Re: Agenda for the 2022-11-30 SG16 telecon​; P2693R0 review

From: Daniel Krügler <daniel.kruegler_at_[hidden]>
Date: Wed, 30 Nov 2022 17:14:21 +0100
Am Mi., 30. Nov. 2022 um 17:05 Uhr schrieb Jens Maurer via SG16
<sg16_at_[hidden]>:
>
>
> On 29/11/2022 23.59, Tom Honermann wrote:
> > It is still possible to do the bad thing, but one has to be explicit about it. That isn't a concern here.
> >
> > std::wcout << std::to_string(std::stacktrace::current()).c_str();
>
> Sorry, but
>
>
> #include <string>
> #include <iostream>
>
> int main()
> {
> std::wcout << std::string() << std::endl;
> }
>
>
> doesn't compile for me. I believe your "explicit"
> example is ill-formed.

Tom's example should work, because std::wcout can write const char*,
but it cannot write std::string, as you revised example uses.

- Daniel

Received on 2022-11-30 16:14:33