Message ID | 20140415182910.GO6807@redhat.com |
---|---|
State | New |
Headers | show |
On 15/04/14 19:29 +0100, Jonathan Wakely wrote: >Add const to functions that would change meaning in C++14. > >Tested x86_64-linux, committed to trunk. Also committed to the 4.9 branch > * include/bits/atomic_base.h (__atomic_base<_PTp*>::_M_type_size): Add > const to constexpr member functions.
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 242459a..1fc0ebb 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -675,10 +675,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Factored out to facilitate explicit specialization. constexpr ptrdiff_t - _M_type_size(ptrdiff_t __d) { return __d * sizeof(_PTp); } + _M_type_size(ptrdiff_t __d) const { return __d * sizeof(_PTp); } constexpr ptrdiff_t - _M_type_size(ptrdiff_t __d) volatile { return __d * sizeof(_PTp); } + _M_type_size(ptrdiff_t __d) const volatile { return __d * sizeof(_PTp); } public: __atomic_base() noexcept = default;