title: How to make an infinite sequence in C++
body: <p>I'm using Visual Studio 2012 so C++11 is mostly OK...
  boost is also fine, but I would prefer to avoid other libreries, at least not widley used ones.</p>
  
  <p>I want to create a forward only iterator that returns an infinite sequence, in the most elegant way possible. For example a sequence of all the natural numbers. </p>
  
  <p>Basically I want the C++ equivilent of this f# code: </p>
  
  <pre><code>let nums =
      seq { while true do
              yield 1
              yield 2
          }
  </code></pre>
  
  <p>the above code basically creates an enumerator that returns [1;2;1;2...]</p>
  
  <p>I know I could do this by writing a class, but there's got to be a shorter way with all the new lambdas and all...</p>