diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-05-25 10:36:28 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-05-25 10:36:28 +0100 |
commit | 834f4c435552e158829d25745962d4d3564beb93 (patch) | |
tree | 6f8b0c868efc585b3989ba8228cf1747456b2db6 /libstdc++-v3 | |
parent | 6aa1abe5f29491a70fda964f13427a82fd65df95 (diff) | |
download | gcc-834f4c435552e158829d25745962d4d3564beb93.zip gcc-834f4c435552e158829d25745962d4d3564beb93.tar.gz gcc-834f4c435552e158829d25745962d4d3564beb93.tar.bz2 |
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.
From-SVN: r236697
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/hashtable_policy.h | 15 |
3 files changed, 15 insertions, 11 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3fc811d..358341b 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 78353ae..57024e4 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 0b317c3..759d0ca 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 |