Fix builds on Linux CI

This fixes compilation on older Linux compilers (gcc 7.5.0, clang 7.0.0)
that do not seem to implement P0558R1 defect report, thus not allowing
the usage of value_type member typedef from std::atomic.
This commit is contained in:
Denis Orlov 2023-01-04 23:50:30 +03:00
parent 3459fd780a
commit 3e3877ac83

View File

@ -4006,6 +4006,8 @@ template<typename AtomicT>
struct AtomicTransactionalIncrement
{
public:
using T = decltype(AtomicT().load());
~AtomicTransactionalIncrement()
{
if(m_Atomic)
@ -4013,7 +4015,7 @@ public:
}
void Commit() { m_Atomic = nullptr; }
typename AtomicT::value_type Increment(AtomicT* atomic)
T Increment(AtomicT* atomic)
{
m_Atomic = atomic;
return m_Atomic->fetch_add(1);