C++ Logo

std-discussion

Advanced search

Re: format_to (a char array) easy to misuse

From: Olaf van der Spek <ml_at_[hidden]>
Date: Thu, 6 Oct 2022 08:28:38 +0200
On Tue, Oct 4, 2022 at 9:24 PM Edward Catmur <ecatmur_at_[hidden]> wrote:
> It would probably make sense to warn on / deprecate `std::format_to(T(&)[N], ...)`. I think compilers should be able to do that without any change to the Standard.

It's not just C arrays. If I pass std::array::begin() or data() or
std::array::begin() or data() the same thing happens.

-- 
Olaf

Received on 2022-10-06 06:28:53