title: Program exits with status code 0 in the middle of the execution in debug
body: <p>I've reduced my program to the absolute minimum, and seem to have a weird bug in debug mode (it works in release mode). Whenever I set a breakpoint on the line <code>auto* buckets = new Temp[bucket_count];</code>, Clion exits with <code>Process finished with exit code 0</code> within a half of a second after stopping at the line. No more lines of code are executed after this.</p>
  
  <p>However, if I comment out the lambda <code>const auto GetBucketIndex = ...;</code>, the breakpoint stops as it should and I can continue to step through my program (this behaviour is the same for both this example and my non-reduced program). Removing the template and replacing it with <code>int</code> also removes the bug.</p>
  
  <p>My initial thought was that I had some undefined behaviour somewhere, but I cannot see that there would be any. What could be the issue? Is this a bug with Clion perhaps? I've had the same problem with an other networking project of mine. </p>
  
  <pre><code>#include &lt;cstdio&gt;
  
  struct Temp
  {
      int hello;
  };
  
  
  template &lt;class T&gt;
  void BucketSort(T* array, size_t count, size_t bucket_count)
  {
      auto* buckets = new Temp[bucket_count];
      const auto GetBucketIndex = [](int element, size_t bucket_count) { return size_t((element / 9.0001f) * bucket_count); };
  }
  
  
  int main()
  {
      printf("BucketSort:     ");
      int array[10] = {6, 3, 2, 0, 1, 5, 8, 7, 9, 4};
      BucketSort(array, 10, 3);
  }
  </code></pre>