summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-25 09:36:28 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-25 09:36:28 +0000
commit702bea7a5d49b1156a0fcbed39ad10fbc5cb58dd (patch)
tree6f8b0c868efc585b3989ba8228cf1747456b2db6 /libstdc++-v3
parent14240409c384628d428fb9cc84cbda90d54732d9 (diff)
downloadgcc-702bea7a5d49b1156a0fcbed39ad10fbc5cb58dd.tar.gz
Remove _GLIBCXX14_USE_CONSTEXPR
* include/bits/c++config (_GLIBCXX14_USE_CONSTEXPR): Remove it. * include/bits/hashtable_policy.h (_Power2_rehash_policy::_M_next_bkt): Remove const qualification on function. Replace _GLIBCXX14_USE_CONSTEXPR on automatic variables with const. (_Power2_rehash_policy::_M_need_rehash): Remove const qualification. (_Power2_rehash_policy::_M_next_bkt): Remove mutable specifier. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236697 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/include/bits/c++config2
-rw-r--r--libstdc++-v3/include/bits/hashtable_policy.h15
3 files changed, 15 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 3fc811d1611..358341b096f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2016-05-25 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/c++config (_GLIBCXX14_USE_CONSTEXPR): Remove it.
+ * include/bits/hashtable_policy.h (_Power2_rehash_policy::_M_next_bkt):
+ Remove const qualification on function. Replace
+ _GLIBCXX14_USE_CONSTEXPR on automatic variables with const.
+ (_Power2_rehash_policy::_M_need_rehash): Remove const qualification.
+ (_Power2_rehash_policy::_M_next_bkt): Remove mutable specifier.
+
2016-05-24 François Dumont <fdumont@gcc.gnu.org>
* include/bits/c++config (_GLIBCXX14_USE_CONSTEXPR): New.
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index 78353ae9eb6..57024e40ec0 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -106,10 +106,8 @@
#ifndef _GLIBCXX14_CONSTEXPR
# if __cplusplus >= 201402L
# define _GLIBCXX14_CONSTEXPR constexpr
-# define _GLIBCXX14_USE_CONSTEXPR constexpr
# else
# define _GLIBCXX14_CONSTEXPR
-# define _GLIBCXX14_USE_CONSTEXPR const
# endif
#endif
diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h
index 0b317c335b8..759d0cacaf2 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -557,13 +557,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Return a bucket size no smaller than n (as long as n is not above the
// highest power of 2).
std::size_t
- _M_next_bkt(std::size_t __n) const noexcept
+ _M_next_bkt(std::size_t __n) noexcept
{
- _GLIBCXX14_USE_CONSTEXPR size_t __max_width
- = std::min<size_t>(sizeof(size_t), 8);
- _GLIBCXX14_USE_CONSTEXPR auto __max_bkt
- = std::size_t(1) << (__max_width * __CHAR_BIT__ - 1);
-
+ const auto __max_width = std::min<size_t>(sizeof(size_t), 8);
+ const auto __max_bkt = size_t(1) << (__max_width * __CHAR_BIT__ - 1);
std::size_t __res = __clp2(__n);
if (__res == __n)
@@ -595,7 +592,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// is the new bucket count. If not, return make_pair(false, 0).
std::pair<bool, std::size_t>
_M_need_rehash(std::size_t __n_bkt, std::size_t __n_elt,
- std::size_t __n_ins) const noexcept
+ std::size_t __n_ins) noexcept
{
if (__n_elt + __n_ins >= _M_next_resize)
{
@@ -630,8 +627,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
static const std::size_t _S_growth_factor = 2;
- float _M_max_load_factor;
- mutable std::size_t _M_next_resize;
+ float _M_max_load_factor;
+ std::size_t _M_next_resize;
};
// Base classes for std::_Hashtable. We define these base classes