https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122172
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
With this corresponding change too:
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// If long is wider than _Atomic_word then we can treat _Atomic_word
// as unsigned, and so double its usable range. If the widths are the
// same then casting to unsigned and then to long is a no-op.
- using _Up = typename make_unsigned<_Atomic_word>::type;
+ using _Up = _Atomic_word_unsigned;
// No memory barrier is used here so there is no synchronization
// with other threads.
@@ -300,8 +300,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline long
_Sp_counted_base<_S_single>::_M_get_use_count() const noexcept
{
- using _Up = typename make_unsigned<_Atomic_word>::type;
- return (_Up) _M_use_count;
+ return (_Atomic_word_unsigned) _M_use_count;
}