mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-22 04:10:05 +00:00
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:
parent
3459fd780a
commit
3e3877ac83
@ -4006,6 +4006,8 @@ template<typename AtomicT>
|
|||||||
struct AtomicTransactionalIncrement
|
struct AtomicTransactionalIncrement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
using T = decltype(AtomicT().load());
|
||||||
|
|
||||||
~AtomicTransactionalIncrement()
|
~AtomicTransactionalIncrement()
|
||||||
{
|
{
|
||||||
if(m_Atomic)
|
if(m_Atomic)
|
||||||
@ -4013,7 +4015,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Commit() { m_Atomic = nullptr; }
|
void Commit() { m_Atomic = nullptr; }
|
||||||
typename AtomicT::value_type Increment(AtomicT* atomic)
|
T Increment(AtomicT* atomic)
|
||||||
{
|
{
|
||||||
m_Atomic = atomic;
|
m_Atomic = atomic;
|
||||||
return m_Atomic->fetch_add(1);
|
return m_Atomic->fetch_add(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user