title: Can I make a thread-safe std::atomic<vector<int>>?
body: <p>I'm having a function that needs to be executed <code>n=1000</code> times. This functions does a Monte Carlo style simulation and returns an <code>int</code> as the result. I'd like to run <code>nthreads=4</code> in parallel. Whenever a thread finishes one cycle, it should put the result in a <code>std::vector&lt;int&gt;</code>.
  Thus, after 1000 cycles, I've a vector of 1000 <code>int</code>s that can be examined by statistics.</p>
  
  <p>Since a <code>std::vector</code> is not thread-safe, I thought about <code>std::mutex</code> (which would surely work).</p>
  
  <p>But I wonder if I can declare a vector to be atomic and thus get around mutexes?
  Is it possible to have a <code>std::atomic&lt;std::vector&lt;int&gt;&gt;</code>? And can I use <code>push_back</code> etc. on it?</p>