boost thread_group move ownership of unique_ptr to thread
<p>What workaround exists to make this code run? The code results in "Attempting to reference a deleted function". <code>unique_ptr</code> is assigned in a loop and then passed on to thread and later got rid of.</p>

<pre><code>boost::thread_group threads;
std::unique_ptr&lt;ScenarioResult&gt; scenario_result;

while ((scenario_result = scenarioStock.getNextScenario()) != nullptr)
{
threads.create_thread(boost::bind(&amp;Simulation::RunSimulation, boost::ref(grid_sim), std::move(scenario_result)));
}
</code></pre>