stoi (stoll ...) accept string_view [insted of] string
305 views
Skip to first unread message
yanp...@gmail.com
unread,
Mar 15, 2017, 11:54:57 AM3/15/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ISO C++ Standard - Future Proposals
I suggest adding string_view overloads to this group of functions. I guess the reason why is obvious.
Nicol Bolas
unread,
Mar 15, 2017, 12:08:06 PM3/15/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ISO C++ Standard - Future Proposals, yanp...@gmail.com
On Wednesday, March 15, 2017 at 11:54:57 AM UTC-4, yanp...@gmail.com wrote:
I suggest adding string_view overloads to this group of functions. I guess the reason why is obvious.
Personally, I'd rather have `string_view` overloads of the `from_chars` functions. Let `stoi` and its ilk die.
yanp...@gmail.com
unread,
Mar 15, 2017, 12:52:59 PM3/15/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ISO C++ Standard - Future Proposals, yanp...@gmail.com
I don't see any replacement for stoi. It is compact instead of from_chars and strtol; handles errors (via exceptions, which are hated by some devs), handier than streams.
среда, 15 марта 2017 г., 19:08:06 UTC+3 пользователь Nicol Bolas написал: