In the description of the functions in the proposal the basic_string variants still have a noexcept guarantee.
 

-----Ursprüngliche Nachricht-----
Von: Rhidian De Wit via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: Di 14.05.2024 08:43
Betreff: Re: [std-proposals] .first() and .last() in strings
Anlage: index.html
An: std-proposals@lists.isocpp.org;
CC: Rhidian De Wit <rhidiandewit@gmail.com>; Giuseppe D‘Angelo <giuseppe.dangelo@kdab.com>;
Thank you for your useful insights! The proposal on substr() && was an interesting read!
I've now updated the proposal.
 
Sincerely,
 

Op ma 13 mei 2024 om 11:06 schreef Giuseppe D'Angelo via Std-Proposals <std-proposals@lists.isocpp.org>:
Hi,

Il 13/05/24 09:29, Rhidian De Wit via Std-Proposals ha scritto:
> Hi,
> Here is the latest version of my proposal, and I wonder, how do I now
> continue with this proposal? Do I email for an official number?

Couple of minor comments:

* first/last for basic_string can't be noexcept (they need to allocate);

* just like basic_string::substr, first/last need an overload for rvalue
*this (see P2438R2);

* I'm actually a bit surprised that the existing `substr() &&` overload
is not noexcept. Is there any reason for that? Yes, it calls the
`basic_string(basic_string &&, size_t pos, Allocator)` constructor which
isn't noexcept, but this just raises the question as of why there isn't
a `basic_string(basic_string &&, size_t pos) noexcept` constructor.

* in the wording there is no need of spelling out the template
parameters for the return type. Instead of

> constexpr basic_string_view<charT, traits> first(size_t count) const noexcept

use

> constexpr basic_string_view first(size_t count) const noexcept

(mut.mut. for the rest)


My 2 c,

--
Giuseppe D'Angelo
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

 
--
Rhidian De Wit
Software Engineer - Barco
-- 
 Std-Proposals mailing list
 Std-Proposals@lists.isocpp.org
 https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals