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.
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()