title: How to properly initialize a C++11 std::seed_seq
body: <p>I have a C++11 program that needs to create several independent random generators, for use by different threads in a parallel computation.  These generators should be initialized with different seed values so that they all produce different pseudo-random sequences.</p>
  
  <p>I see that there's a <code>std::seed_seq</code> class that seems to be meant for this purpose, but it's not clear what's the right way to construct one.  The examples I've seen, such as <a href="http://en.cppreference.com/w/cpp/numeric/random/seed_seq" rel="noreferrer">the one on cppreference.com</a>, initialize it with a handful of integer constants hard-coded in the program:</p>
  
  <pre><code>std::seed_seq seq{1,2,3,4,5};
  </code></pre>
  
  <p>I doubt that's actually a recommended best practice, so I'm wondering what <em>is</em> the recommended practice.  In particular:</p>
  
  <ul>
  <li>Since a <code>seed_seq</code> can be initialized with an arbitrary number of integers, what's the significance of the length of its initializer list?  If I want to produce seeds for 100 random generators, do I need to initialize my <code>seed_seq</code> with 100 integers?</li>
  <li>If the length of the initializer list doesn't have to match the number of seeds I intend to generate, is it OK to initialize a <code>seed_seq</code> with just <em>one</em> integer and then use it to produce a large number of seeds?</li>
  <li>How about initializing with <em>no</em> integers, i.e. using the default constructor?  (This means I'd get the same seeds every time, of course.)</li>
  <li>If it's OK to construct a <code>seed_seq</code> from a single integer and then generate lots of seeds from it, what's the benefit of using <code>seed_seq</code> instead of an ordinary random generator?  Why not just construct a <code>std::mt19937</code> from that single integer and use <em>that</em> to produce seed values for other generators?</li>
  </ul>