title: Is vector<auto> not allowed ? (error: invalid use of ‘auto’)
body: <p>I have:</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  int main()
  {
     auto a = -SOME_CONST_MAX;
     vector&lt;auto&gt; myVec {a, a, a, a};
  }
  </code></pre>
  
  <p>I don't know the type of the <code>SOME_CONST_MAX</code> but I want to make a vector of the type of <code>-SOME_CONST_MAX</code>. I assumed <code>vector&lt;auto&gt;</code> would work as it will deduce from type of <code>a</code>. </p>
  
  <p>I'm getting these errors running:
  <code>g++ -std=c++14 main.cpp</code></p>
  
  <pre><code>main.cpp:9:9: error: invalid use of ‘auto’
    vector&lt;auto&gt; myVec {a, a, a, a};
           ^
  main.cpp:9:13: error: template argument 1 is invalid
    vector&lt;auto&gt; myVec {a, a, a, a};
               ^
  main.cpp:9:13: error: template argument 2 is invalid
  main.cpp:9:32: error: scalar object ‘myVec’ requires one element in initializer
    vector&lt;auto&gt; myVec {a, a, a, a};
                                  ^
  </code></pre>
  
  <p>Is <code>vector&lt;auto&gt;</code> not allowed? What am I doing wrong?</p>