title: Misunderstanding of atomic structs and pointers
body: <p>My first question is: Is there any way to access the members of struct in an <code>atomic&lt;struct&gt;</code> object? 
  For example, I get the compiler error:</p>
  
  <pre><code>struct std::atomic&lt;node&gt;’ has no member named ‘data’ a.data = 0; 
  </code></pre>
  
  <p>in this segment</p>
  
  <pre><code>struct node{
    int data;
    node* next;
  };
  
  int main(){
    atomic&lt;node&gt; a;
    a.data = 0;
  }
  </code></pre>
  
  <p>I can work around it by creating a temporary node like so:</p>
  
  <pre><code>  atomic&lt;node&gt; a;
    node temp;
    temp.data = 0;
    a.store(temp);
  </code></pre>
  
  <p>but this doesn't seem very elegant.</p>
  
  <p>The second question is, what if I have a pointer to an atomic object?  Is there anyway to access the members of the node directly?  Obviously the following does not compile, how would I change this to store 0 in the value of the node at b?</p>
  
  <pre><code>atomic&lt;node&gt; b = new node;
  b-&gt;data = 0;
  </code></pre>
  
  <p>This is a solution I've found, but again, is there a more elegant way of doing this??</p>
  
  <pre><code>atomic&lt;node&gt; *b;
  node temp;
  temp.data = 0;
  b-&gt;store(&amp;temp);
  </code></pre>
  
  <p>And lastly, what is the difference between <code>atomic&lt;node*&gt;</code> and <code>atomic&lt;node&gt;*</code></p>