This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove redundant const qualifliers from string_view


On 11/10/16 11:37 +0100, Jonathan Wakely wrote:
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()

I forgot to say, there are still warnings here due to the narrowing
conversions to difference_type.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]