error in common/spinlock.hpp
Closed this issue · 5 comments
in boost/sort/common/spinlock.hpp, line 72, here is a "not", because of this, it couldn`t compile successfully.
bool try_lock ( ) noexcept { return not af.test_and_set (std::memory_order_acquire); };
As a workaround your can #include <ciso646>
before the Boost.Sort header, but that does sound like a problem worth fixing.
It can fix the problem,thanks!
I can reproduce the problem, #include <ciso646>
fixes it. As long as it is included somewhere before the boost includes, it fixes the problem. Nevertheless this is not a clean solution.
@fjtapia The reason why e.g. tests aren't affected: https://github.com/boostorg/sort/blob/develop/test/test_parallel_stable_sort.cpp#L13
To reproduce: change the include order or remove #include <ciso646>
(requires some tests to be disabled or rewritten).
My env: Visual Studio Community 2019. Version 16.9.3