title: Are C++11 thread_local variables automatically static?
body: <p>Is there a difference between these two code segments:</p>
  
  <pre><code>void f() {
      thread_local vector&lt;int&gt; V;
      V.clear();
      ... // use V as a temporary variable
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>void f() {
      static thread_local vector&lt;int&gt; V;
      V.clear();
      ... // use V as a temporary variable
  }
  </code></pre>
  
  <p>Backstory: originally I had a STATIC vector V (for holding some intermediate values, it gets cleared every time I enter the function) and a single-threaded program. I want to turn the program into a multithreading one, so somehow I have to get rid of this static modifier. My idea is to turn every static into thread_local and not worry about anything else? Can this approach backfire?</p>