libcxx atomic_ref.h: add typename keyword for difference_type

declarations, otherwise older clang versions cannot compile this header.

PR:		280562
MFC after:	1 month
This commit is contained in:
Dimitry Andric 2024-08-05 22:07:28 +02:00
parent 6846ab2fb6
commit 81e300df5e

View file

@ -241,7 +241,7 @@ template <class _Tp>
struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
using __base = __atomic_ref_base<_Tp>;
using difference_type = __base::value_type;
using difference_type = typename __base::value_type;
_LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) {
_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(
@ -287,7 +287,7 @@ template <class _Tp>
struct atomic_ref<_Tp> : public __atomic_ref_base<_Tp> {
using __base = __atomic_ref_base<_Tp>;
using difference_type = __base::value_type;
using difference_type = typename __base::value_type;
_LIBCPP_HIDE_FROM_ABI explicit atomic_ref(_Tp& __obj) : __base(__obj) {
_LIBCPP_ASSERT_ARGUMENT_WITHIN_DOMAIN(