title: Inserting std::shared_ptr with lambda into a vector
body: <p>I have a vector defined as:</p>
  
  <pre><code>std::vector&lt;std::shared_ptr&lt;Orders&gt; &gt; vOrders;
  </code></pre>
  
  <p>When adding to <code>vOrders</code> I want to add like:</p>
  
  <pre><code>vOrders.push_back(&lt;std::shared_ptr&lt;Orders&gt; &gt;([]() {
      TimerForProcessingOrders _timerForProcessingOrders;
      _timerForProcessingOrders.detach();
  }));
  </code></pre>
  
  <p>but the compiler is giving me an error:</p>
  
  <pre><code>Expected expression: Expected '(' for function-style cast or type construction
  </code></pre>
  
  <p>It looks weird the <code>&lt;</code> and <code>&gt;</code> around <code>std::shared_ptr</code>but removing it gives an error:</p>
  
  <pre><code>No matching conversion for functional-style cast from '&lt;lambda &gt;' to 'std::shared_ptr&lt;Orders&gt;'
  </code></pre>
  
  <p>What mistake am I making? </p>