OpenMP, in contrast to C++11, works with atomicity from a perspective of memory operations, not variables. That allows, e.g., to use atomic reads/writes for integers being stored in a vector with unknown size at compile time:
std::vector<int> v;
// non-atomic access (e.g., in a sequential region):
v.resize(n);
...
v.push_back(i);
...
// atomic access in a multi-threaded region:
#pragma omp atomic write // seq_cst
v[k] = ...;
#pragma omp atomic read // seq_cst
... = v[k];
In C++11, this is not possible to achieve. We can kind-of access atomic variables as non-atomic by relaxing memory model, but we cannot resize a vector of atomic elements.
I understand that there are reasons why C++ does not allow to access non-atomic variables by atomic memory operations. But I wonder, why these reasons do not apply for OpenMP as well.
For example, in N4013, it is said that "There is no reasonable way to completely portably apply atomic operations to data not declared as atomic." How it's possible that OpenMP can guarantee such portability and C++ not?