Make string_view operations involving CharT* *not* noexcept and consistent beween string_view and string_view.tcc.
Marc Glisse
marc.glisse@inria.fr
Sat Mar 29 21:18:00 GMT 2014
You forgot gcc-patches@ ... Maybe you could create an alias in your mailer
so it automatically adds it when you write to libstdc++@gcc.gnu.org?
On Sat, 29 Mar 2014, Ed Smith-Rowland wrote:
> In string_view I botched the noexcept specification of operations like find
> and friends with CharT* arguments.
>
> I'm a little surprised the inconsistency between string_view and
> string_view.tcc didn't error. In fact, in one repo thats a little behind
> trunk it does. I'll continue to look after that issue separately.
>
> Built and tested clean on x86_64-linux. OK?
(some remarks since I am taking my first look at this file)
I am wondering if you couldn't add more noexcept instead, for some of
those functions (we are allowed to have more than the standard). The
constructor basic_string_view(const char*,size_t) can clearly be marked
noexcept, for instance, and that means find(const char*,size_t,size_t)
should have the same guarantees as find(basic_string_view,size_t).
I notice that the default constructor and basic_string_view(nullptr,n)
have _M_str point to a special array. What would break with using 0?
Those remarks can all wait.
--
Marc Glisse
More information about the Libstdc++
mailing list