C++ Logo

std-proposals

Advanced search

Re: [std-proposals] D2879R0 Proposal of Pythonesque std::print extensions LIVE LINK

From: Andrew Tomazos <andrewtomazos_at_[hidden]>
Date: Tue, 16 May 2023 19:09:37 +1000
On Mon, May 15, 2023 at 1:30 AM Sebastian Wittmeier via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> std::cout.put(65) writes "A"
>
> So not compatible.
>
> puts("65") expects a pointer and writes "65\n"
>
>
>
> For print and println ostream-members have been created in addition to
> free std::print and std::println, and it would make sense for such an
> autodetecting function.
>
>
>
> puts has string in its name and would be illogical to auto-detect other
> types. One can reason it would convert to string.
>
>
>
> Would it be safe and continue to work with any current use?
>

I don't understand the question. Would what be safe? and continue to work
with the current use of what? Continue to work after what event?

Received on 2023-05-16 09:09:51