Officially, no. In practice, probably.
Page Section 1.7 page 32 of the OpenMP 5.0 Specification says:
While future versions of the OpenMP specification are expected to address the following features, currently their use may result in unspecified behavior.
Concurrency
Additions to the standard library
C++11 Library
However, depending on the implementation of the OpenMP runtime you use, it might be alright. In fact, the LLVM OpenMP runtime even uses std::atomic
to implement some of the OpenMP specification.
The safest option though is to stick with using only what OpenMP provides. Anything you can do using std::atomic
you should also be able to achieve using only OpenMP.