C++ Logo

std-proposals

Advanced search

Re: [std-proposals] string_view support for std::stoi and friends

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Mon, 13 Jan 2025 20:17:05 +0000
Isn't <charconv> already locale independent?
In what way after C++17 would stoi not be obsolete?


-----Original Message-----
From: Std-Proposals <std-proposals-bounces_at_lists.isocpp.org> On Behalf Of Zhihao Yuan via Std-Proposals
Sent: Monday, January 13, 2025 8:43 PM
To: std-proposals_at_lists.isocpp.org
Cc: Zhihao Yuan <zy_at_[hidden]>
Subject: Re: [std-proposals] string_view support for std::stoi and friends

On Saturday, January 11th, 2025 at 9:06 AM, Lénárd Szolnoki via Std-Proposals <std-proposals_at_lists.isocpp.org> wrote:

>

> strtoll is also technically locale-dependent, but I don't know what that means in practice. In what locales (if any) is the behavior different?
>


We made std::to_string locale-independent (defined in terms of std::format) in C++26, I'm sure that we can do the same to stoi, maybe after collecting some usage data.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
_______________________________________________

Received on 2025-01-13 20:17:08