File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ set(CMAKE_BUILD_TYPE Debug)
4545
4646#Set the compiler if the CXX environment variable is not set
4747if (NOT CMAKE_CXX_COMPILER)
48- set (CMAKE_CXX_COMPILER g++ )
48+ set (CMAKE_CXX_COMPILER clang )
4949endif ()
5050#Set the compiler if the CXX_STANDARD environment variable is not set
5151if (NOT CMAKE_CXX_STANDARD)
@@ -58,7 +58,7 @@ endif()
5858if (QUANTUM_VERBOSE_MAKEFILE)
5959 message (STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS} " )
6060endif ()
61-
61+ set (CXX_EXTENSIONS ON )
6262# Determine if this is a 32 or 64 bit build
6363math (EXPR BITS "8*${CMAKE_SIZEOF_VOID_P} " )
6464
Original file line number Diff line number Diff line change @@ -28,6 +28,19 @@ namespace quantum {
2828// ==============================================================================
2929// SpinLock
3030// ==============================================================================
31+ inline
32+ SpinLock::SpinLock (SpinLock&& o) : _flag(o._flag.load()) { }
33+
34+ inline
35+ SpinLock& SpinLock::operator =(SpinLock&& o)
36+ {
37+ if (this != &o)
38+ {
39+ _flag.store (o._flag .load ());
40+ }
41+ return *this ;
42+ }
43+
3144inline
3245void SpinLock::lock ()
3346{
Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ class SpinLock
3939 SpinLock (const SpinLock&) = delete ;
4040
4141 // / @brief Move constructor.
42- SpinLock (SpinLock&&) = default ;
42+ SpinLock (SpinLock&&);
4343
4444 // / @brief Copy assignment operator.
4545 SpinLock& operator =(const SpinLock&) = delete ;
4646
4747 // / @brief Move assignment operator.
48- SpinLock& operator =(SpinLock&&) = default ;
48+ SpinLock& operator =(SpinLock&&);
4949
5050 // / @brief Locks this object.
5151 // / @note Blocks the current thread until the lock is acquired. Blocking is achieved
You can’t perform that action at this time.
0 commit comments