From: Jonathan Wakely Date: Wed, 25 May 2016 09:36:28 +0000 (+0100) Subject: Remove _GLIBCXX14_USE_CONSTEXPR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=834f4c435552e158829d25745962d4d3564beb93;p=gcc.git 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 --- 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 + + * 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 * 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(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(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 _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