title: What does {error C2338: (boost::has_trivial_destructor<T>::value)} mean for boost::lockfree::queue ? What am I missing here?
body: <p>I have a struct <code>MyClass</code> inside another class <code>MyOuterClass</code> I am trying to put into a boost::lockfree::queue. My structure looks like below</p>
  
  <pre><code>struct MyClass
  {
      MyClass() {}
      MyClass(const string&amp; topic, const string&amp; multicastChannel, const string&amp; netInterface, MyOuterClass::MY_COMMAND_ENUM command, MyOuterClass::CallbackType callback)
      :topic(topic), multicastChannel(multicastChannel), netInterface(netInterface), command(command), callback(callback) {}
  
      MyClass(const MyClass&amp; src)
      :topic(src.topic), multicastChannel(src.multicastChannel), netInterface(src.netInterface), command(src.command), callback(src.callback) {}
      MyClass&amp; operator=(const MyClass&amp; src)
      {
          topic = src.topic;
          multicastChannel = src.multicastChannel;
          netInterface = src.netInterface;
          command = src.command;
          callback = src.callback;
      }
  
      ~MyClass(){}
  
      string topic;
      string multicastChannel;
      string netInterface;
      MyOuterClass::MY_COMMAND_ENUM command;
      MyOuterClass::CallbackType callback;
  };
  </code></pre>
  
  <p>My outer class has a public member variable <code>boost::lockfree::queue&lt;MyClass&gt; m_commandQueue;</code> which throws the following error when I try to compile.</p>
  
  <pre><code>1&gt;------ Build started: Project: MDServices, Configuration: Debug x64 ------
  1&gt;Build started 6/10/2013 4:41:00 PM.
  1&gt;InitializeBuildStatus:
  1&gt;  Touching "x64\Debug\MDServices.unsuccessfulbuild".
  1&gt;ClCompile:
  1&gt;  MyOuterClass.cpp
  1&gt;C:\local\boost_1_53_0\boost/lockfree/queue.hpp(79): error C2338: (boost::has_trivial_destructor&lt;T&gt;::value)
  1&gt;          src\MyOuterClass.cpp(70) : see reference to class template instantiation 'boost::lockfree::queue&lt;T&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=MDServices::MyClass
  1&gt;          ]
  1&gt;C:\local\boost_1_53_0\boost/lockfree/queue.hpp(83): error C2338: (boost::has_trivial_assign&lt;T&gt;::value)
  1&gt;
  1&gt;Build FAILED.
  1&gt;
  1&gt;Time Elapsed 00:00:03.38
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>I checked the thread <a href="https://stackoverflow.com/questions/15468278/boost-lockfree-queue-hpp-error-static-assertion-failed-boosthas-trivial-d/15468325#15468325">/boost/lockfree/queue.hpp: error: static assertion failed: (boost::has_trivial_destructor&lt;T&gt;::value)</a> however I am still unable to compile. What am I missing here?</p>
  
  <p>Thanks.</p>
  
  <p>Chinmay</p>