Make use of increment/decrement operators of std::atomic.

This commit is contained in:
Tsuda Kageyu
2016-12-09 09:56:37 +09:00
parent 250c59f783
commit a19a623d4b
2 changed files with 6 additions and 6 deletions

View File

@ -46,9 +46,9 @@ endif()
check_cxx_source_compiles("
#include <atomic>
int main() {
std::atomic<unsigned int> x;
x.fetch_add(1);
x.fetch_sub(1);
std::atomic_int x;
++x;
--x;
return 0;
}
" HAVE_STD_ATOMIC)