Problems with STL as a static volatile member
<p>I'm trying to compile something like this:</p>

<pre><code>
#include &lt;list&gt;

class thread
{
public:
 static volatile std::list&lt;thread *&gt; threadList;    //This is also protected by a mutex
};
volatile std::list&lt;thread *&gt; thread::threadList;

void main()
{
 thread A;
 thread::threadList.push_back(&A);
 thread::threadList.remove(&A);
}</code></pre>

<p>I get these errors when trying to compile:</p>

<pre><code>
test.cpp(14): error C2663: 'std::list::push_back' : 2 overloads have no legal conversion for 'this' pointer
          with
          [
              _Ty=thread *
          ]
test.cpp(15): error C2662: 'std::list::remove' : cannot convert 'this' pointer from 'volatile std::list' to 'std::list &'
          with
          [
              _Ty=thread *
          ]
          Conversion loses qualifiers</code></pre>

<p>What am I doing wrong?<br>
EDIT: fixed some formatting errors with &lt; and ><br>
EDIT2: threadList is protected by a mutex, I just didn't put it here for simplicity</p>
