diff mbox series

Missing noexcept in string_view::find_first_of declaration

Message ID f5102d0e-776d-b456-8135-4a5e7a61fe9e@redhat.com
State New
Headers show
Series Missing noexcept in string_view::find_first_of declaration | expand

Commit Message

Stephan Bergmann Nov. 24, 2017, 5:09 p.m. UTC

Comments

Jonathan Wakely Nov. 24, 2017, 5:32 p.m. UTC | #1
On 24/11/17 18:09 +0100, Stephan Bergmann wrote:
>cf. definition in libstdc++-v3/include/bits/string_view.tcc that does have the
>noexcept (like all the other overloads defined inline in
>libstdc++-v3/include/std/string_view do).

I thought Jason already fixed this in
https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01106.html but it
doesn't seem to have been committed yet.

I'll take care of it. Thanks for the patch.


>---
> libstdc++-v3/include/std/string_view | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view
>index fa834002726..68b4b08f8f4 100644
>--- a/libstdc++-v3/include/std/string_view
>+++ b/libstdc++-v3/include/std/string_view
>@@ -323,7 +323,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
>       { return this->find(__c, __pos); }
> 
>       constexpr size_type
>-      find_first_of(const _CharT* __str, size_type __pos, size_type __n) const;
>+      find_first_of(const _CharT* __str, size_type __pos, size_type __n) const noexcept;
> 
>       constexpr size_type
>       find_first_of(const _CharT* __str, size_type __pos = 0) const noexcept
>-- 
>2.13.6
>
Jonathan Wakely Nov. 27, 2017, 7:44 p.m. UTC | #2
On 24/11/17 17:32 +0000, Jonathan Wakely wrote:
>On 24/11/17 18:09 +0100, Stephan Bergmann wrote:
>>cf. definition in libstdc++-v3/include/bits/string_view.tcc that does have the
>>noexcept (like all the other overloads defined inline in
>>libstdc++-v3/include/std/string_view do).
>
>I thought Jason already fixed this in
>https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01106.html but it
>doesn't seem to have been committed yet.
>
>I'll take care of it. Thanks for the patch.

Committed to trunk. Thanks.
diff mbox series

Patch

From 0a75fbb0c16e216892d16f1ba3448471e33f61bb Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Fri, 24 Nov 2017 18:04:30 +0100
Subject: [PATCH] Missing noexcept in string_view::find_first_of declaration

cf. definition in libstdc++-v3/include/bits/string_view.tcc that does have the
noexcept (like all the other overloads defined inline in
libstdc++-v3/include/std/string_view do).
---
 libstdc++-v3/include/std/string_view | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view
index fa834002726..68b4b08f8f4 100644
--- a/libstdc++-v3/include/std/string_view
+++ b/libstdc++-v3/include/std/string_view
@@ -323,7 +323,7 @@  _GLIBCXX_BEGIN_NAMESPACE_VERSION
       { return this->find(__c, __pos); }
 
       constexpr size_type
-      find_first_of(const _CharT* __str, size_type __pos, size_type __n) const;
+      find_first_of(const _CharT* __str, size_type __pos, size_type __n) const noexcept;
 
       constexpr size_type
       find_first_of(const _CharT* __str, size_type __pos = 0) const noexcept
-- 
2.13.6