Skip to content

Commit f8488ac

Browse files
authored
Remove old std::atomic_ref polyfill. (#180)
1 parent d837786 commit f8488ac

1 file changed

Lines changed: 0 additions & 44 deletions

File tree

MarathonRecomp/framework.h

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -83,47 +83,3 @@ inline bool strcmpIgnoreCase(const char* a, const char* b)
8383

8484
return true;
8585
}
86-
87-
#ifndef __cpp_lib_atomic_ref
88-
// Polyfill for std::atomic_ref
89-
namespace std {
90-
template <typename value_type>
91-
class atomic_ref
92-
{
93-
public:
94-
atomic_ref(value_type& ref)
95-
{
96-
ptr = reinterpret_cast<std::atomic<value_type>*>(&ref);
97-
}
98-
99-
void store(value_type desired)
100-
{
101-
ptr->store(desired);
102-
}
103-
104-
bool compare_exchange_weak(value_type& expected, value_type desired)
105-
{
106-
return ptr->compare_exchange_weak(expected, desired);
107-
}
108-
109-
void wait(value_type old)
110-
{
111-
ptr->wait(old);
112-
}
113-
114-
void notify_one()
115-
{
116-
ptr->notify_one();
117-
}
118-
119-
bool operator=(const value_type& rhs)
120-
{
121-
store(rhs);
122-
}
123-
124-
private:
125-
std::atomic<value_type>* ptr;
126-
};
127-
}
128-
#endif
129-

0 commit comments

Comments
 (0)