* [PATCH] Remove redundant const qualifliers from string_view
@ 2016-10-11 10:37 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2016-10-11 10:37 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
These return types cause "type qualifiers ignored on function return
type" warnings with -Wsystem-headers.
* include/experimental/string_view (basic_string_view::_S_compare):
Remove redundant const from return type.
* include/std/string_view (basic_string_view:_S_compare): Likewise.
Tested powerpc64le-linux, committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1498 bytes --]
commit 18f41619e2e59ccbd0653f39bc1c983c225fe561
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Oct 11 10:33:24 2016 +0000
Remove redundant const qualifliers from string_view
* include/experimental/string_view (basic_string_view::_S_compare):
Remove redundant const from return type.
* include/std/string_view (basic_string_view:_S_compare): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240981 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/libstdc++-v3/include/experimental/string_view b/libstdc++-v3/include/experimental/string_view
index 8cb8c1f..c1dfef0 100644
--- a/libstdc++-v3/include/experimental/string_view
+++ b/libstdc++-v3/include/experimental/string_view
@@ -420,7 +420,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
- static constexpr const int
+ static constexpr int
_S_compare(size_type __n1, size_type __n2) noexcept
{
return difference_type{__n1 - __n2} > std::numeric_limits<int>::max()
diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view
index 14bfcd0..b2d2a29 100644
--- a/libstdc++-v3/include/std/string_view
+++ b/libstdc++-v3/include/std/string_view
@@ -414,7 +414,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
private:
- static constexpr const int
+ static constexpr int
_S_compare(size_type __n1, size_type __n2) noexcept
{
return difference_type{__n1 - __n2} > std::numeric_limits<int>::max()
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-10-11 10:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 10:37 [PATCH] Remove redundant const qualifliers from string_view Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).