title: Constructing "array" of noncopyable objects
body: <p>I have a class that's inhenerently non-copyable (a thread, so there's no copy semantics that make sense), and I want to have a largeish 'array' of these, identically constructed with a non-default constructor. Note that the array is fixed size.</p>
  
  <p>I can only use the default constructor with C++ arrays, unless I initialise each one independently.</p>
  
  <pre><code>Thread myArray[128];   // uses default constructor - wrong
  </code></pre>
  
  <p>I can list the object constructors and parameters explicitly, but that's verbose and ugly</p>
  
  <pre><code>Thread myArray[128] = { Thread(params,...), Thread(params,...), ... x 128 ;  // ugly
  </code></pre>
  
  <p>It seems I can't use stl vectors because the object is non-copyable - event though the vector never changes size. I guess the constructor actually does copying!</p>
  
  <pre><code>std::vector&lt;Thread&gt; myVector(128, Thread(params,...));// won't compile
  </code></pre>
  
  <p>The way I've though of doing this is with an array of smart pointers and an initialization loop, but maybe I'm missing something: </p>
  
  <p>Is there any other way - maybe with boost containers, or a different container type? </p>