Member initializer list notation: curly braces vs parentheses
<p>Consider the following code snippet from pg. 17 's <em>A Tour of C++</em>:</p>
<pre><code>class Vector {
public:
  Vector(int s) :elem{new double[s]}, sz{s} { } //construct a Vector
  double&amp; operator[](int i) { return elem[i]; } //element access: subscripting
  int size() { return sz; }
private:
  double* elem; // pointer to the elements
  int sz;  // the number of elements
};
</code></pre>
<p>Here I'm concerned about the <strong>member initializer list</strong> on the third line, where Stroustrup separates a colon from the two initializer statements <code>elem{new double[s]}</code> and <code>sz{s}</code>.</p>
<p><strong>Question:</strong> Why here does he use curly braces (i.e., <code>{..}</code>) to make these two initializer statements? I have seen elsewhere on the web people making initializer lists with parentheses, such that this could also (AFAIK) legally read <code>elem(new double[s])</code> and <code>sz(s)</code>. So is there a semantic difference between these two notations? Are there other ways one could initialize these variables (within the context of an initializer list)?</p>