title: Compiler error C3493: 'func' cannot be implicitly captured because no default capture mode has been specified
body: <p>Can you help me resolve this compiler error?</p>
  
  <pre><code>template&lt;class T&gt;
  static void ComputeGenericDropCount(function&lt;void(Npc *, int)&gt; func)
  {
      T::ForEach([](T *what) {
          Npc *npc = Npc::Find(what-&gt;sourceId);
  
          if(npc)
              func(npc, what-&gt;itemCount); // &lt;&lt;&lt;&lt;&lt;&lt;&lt; ERROR HERE
              // Error    1   error C3493: 'func' cannot be implicitly captured because no default capture mode has been specified
  
      });
  }
  
  static void PreComputeNStar()
  {
       // ...
      ComputeGenericDropCount&lt;DropSkinningNpcCount&gt;([](Npc *npc, int i) { npc-&gt;nSkinned += i; });
      ComputeGenericDropCount&lt;DropHerbGatheringNpcCount&gt;([](Npc *npc, int i) { npc-&gt;nGathered += i; });
      ComputeGenericDropCount&lt;DropMiningNpcCount&gt;([](Npc *npc, int i) { npc-&gt;nMined += i; });
  }
  </code></pre>
  
  <p>I can't understand why it's giving me the error and I don't know how to fix it. <code>ComputeGenericDropCount(auto func)</code> doesn't work either.</p>