Atomic fixed-size parallel std::vector wrapper
You haven't shown how you intend to use this thing, so it's impossible to say for sure whether it "works correctly." For example, obviously it doesn't work if you're planning to use it like this:

AtomicFixedSizeVector&lt;int&gt; v;
v.reserve(100);
std::thread t1([&amp;]() {
    while (v.size() &lt; 10) v.push_back(42);
});
std::thread t2([&amp;]() {
    while (v.size() &lt; 10) std::this_thread::sleep_for(1ms);
    std::cout &lt;&lt; v.m_data[0] &lt;&lt; "\n";  // DATA RACE!
});




Obviously it won't compile if your type T isn't default-constructible. You could address that idiomatically by adding

static_assert(std::is_default_constructible_v&lt;T&gt;);


to the top of the class body — thus hopefully reassuring the client-programmer that the crazy template error message they just got was intended, and not a bug.



Your reserve method can only be called once, and m_count increases monotonically. Think about whether to implement a clear() method, and what it might do. Think about whether reserve() should reset m_count to zero or not.

My kneejerk reaction is that reserve shouldn't exist at all, and that you should force the user to construct the container with the right capacity to begin with:

explicit AtomicFixedSizeVector(int capacity);




ALX23z is right that what you mean is FixedCapacity, not FixedSize.