title: error C3499: a lambda that has been specified to have a void return type cannot return a value
body: <p>I am using the following lambda and I am getting this error. I can't figure out why the compiler doesn't like what I am doing.</p>
  
  <pre><code>std::string captchaWord(6, 0);
  std::generate(captchaWord.begin(), captchaWord.end(), []() {
      unsigned int num = Randomizer('z' - 'a' + 1 + '9' - '0' + 1);
      char ch = num + 'a';
      if (num &gt;= 'z' - 'a' + 1)
      {
          ch += '0' - 'z' - 1;
      }
      return ch;
  });
  </code></pre>
  
  <p>By the way, Randomizer is a function with the following signature:</p>
  
  <pre><code>unsigned int Randomizer(unsigned int);
  </code></pre>
  
  <p>This is the error message I get:</p>
  
  <p>error C3499: a lambda that has been specified to have a void return type cannot return a value.</p>