Using nvc++ and the
-std=c++2a flag, it seems that including
<atomic> will lead to an error with version 21.3 of the HPC SDK:
/usr/include/c++/10/atomic", line 931: error: identifier __GCC_ATOMIC_CHAR8_T_LOCK_FREE" is undefined
static constexpr bool is_always_lock_free = ATOMIC_CHAR8_T_LOCK_FREE == 2;
I’m running Ubuntu 20.10, which I know is unsupported. As a workaround, if I define
__GCC_ATOMIC_CHAR8_T_LOCK_FREE to 2, our tests still pass.
It’s great to see C++20 support coming through in nvc++ now.