unique_ptr push_back and std::list
<p>I was just wondering how would I be able to push back an object into a list with unique_ptr, if at all possible.</p>

<p>I am receiving the error: </p>

<pre><code>  error: 
  no matching constructor for initialization of
  'std::__1::unique_ptr&lt;tester::Stimulation,
  std::__1::default_delete&lt;tester::Stimulation&gt; &gt;'
            ::new ((void*)__p) _Tp(__a0);
</code></pre>

<p>my code is as follow:</p>

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

namespace tester
{
  class Stimulation
  {
    std::string name;

  public:
    Stimulation(std::string n) : name(n) {}
    std::string getName() const {return name;}
  };
}

using namespace tester;


int main(int argc, char const *argv[])
{
  std::list&lt; std::unique_ptr&lt;tester::Stimulation*&gt; &gt; configuration;
  //std::list&lt; std::unique_ptr&lt;tester::Stimulation&gt; &gt;::iterator i = configuration.begin();

  configuration.push_back(std::unique_ptr&lt;tester::Stimulation&gt;(new Stimulation("NAME1")));


  return 0;
}
</code></pre>