This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Add const to constexpr member function in regex.h
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Oct 2014 10:05:43 +0100
- Subject: [patch] Add const to constexpr member function in regex.h
- Authentication-results: sourceware.org; auth=none
In C++14 constexpr member functions are no longer implicitly const.
Tested x86_64-linux, committed to trunk and 4.9
commit 63d852cc56aa0f44ee0f770594c79705331933ec
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Oct 8 09:34:15 2014 +0100
* include/bits/regex.h (regex_token_iterator::_M_end_of_seq): Add
const qualifier.
diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
index 4ec20d7..4244f2e 100644
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -2689,7 +2689,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
constexpr bool
- _M_end_of_seq()
+ _M_end_of_seq() const
{ return _M_result == nullptr; }
_Position _M_position;