title: C++ What atomic operations we can use on trival user defined data type
body: <p>I am trying to understand std::atomic types and atomic operations. Below is my code:</p>
  <pre><code>#include &lt;atomic&gt;
  #include &lt;iostream&gt;
  
  class A
  {
  public:
      int x;
      void Show() {}
  };
  
  int main()
  {
      std::atomic&lt;A&gt; fooA;
      // fooA.Show(); -- gives me std::atomic&lt;A&gt; has no member Show()
  }
  </code></pre>
  <p>What are the atomic operations we can do when we define a user type - like Mtype.load() etc - how can we use Mtype with load() atomic operations - where load atomically obtains the value of the atomic object?</p>