Make string_view operations involving CharT* *not* noexcept and consistent beween string_view and string_view.tcc.
Jonathan Wakely
jwakely@redhat.com
Tue Aug 26 11:25:00 GMT 2014
On 15/04/14 20:06 +0100, Jonathan Wakely wrote:
>On 29/03/14 14:54 -0400, Ed Smith-Rowland wrote:
>>All,
>>
>>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.
>
>I'm fixing this differently, by strengthening the exception specs as
>Marc suggested. I haven't addressed Marc's other comments, but we
>should do.
>
>Tested x86_64-linux, committed to trunk.
I've also committed this on the 4.9 branch, to fix PR62264
>commit 5ac00aa4544a4c10c3eeadb8ca2a3ce57d9e62ce
>Author: Jonathan Wakely <jwakely@redhat.com>
>Date: Tue Apr 15 19:45:29 2014 +0100
>
> * include/experimental/string_view: Fix inconsistent exception specs.
>
>diff --git a/libstdc++-v3/include/experimental/string_view b/libstdc++-v3/include/experimental/string_view
>index bebeb6b..6b6588b 100644
>--- a/libstdc++-v3/include/experimental/string_view
>+++ b/libstdc++-v3/include/experimental/string_view
>@@ -329,7 +329,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> find(_CharT __c, size_type __pos=0) const noexcept;
>
> size_type
>- find(const _CharT* __str, size_type __pos, size_type __n) const;
>+ find(const _CharT* __str, size_type __pos, size_type __n) const noexcept;
>
> size_type
> find(const _CharT* __str, size_type __pos=0) const noexcept
>@@ -343,7 +343,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> rfind(_CharT __c, size_type __pos = npos) const noexcept;
>
> size_type
>- rfind(const _CharT* __str, size_type __pos, size_type __n) const;
>+ rfind(const _CharT* __str, size_type __pos, size_type __n) const noexcept;
>
> size_type
> rfind(const _CharT* __str, size_type __pos = npos) const noexcept
>
More information about the Libstdc++
mailing list