title: nesting c++11 range loops for finding combinations
body: <p>finding combination involves two loops over the same container.</p>
  
  <pre><code>the first iterates over elements:
    pick an element
    iterate over the elements on the left
      print the first and the second iterated elements
  </code></pre>
  
  <p>so here is a wrong example:</p>
  
  <pre><code>vector&lt;int&gt; vec;
  for(size_t i=0; i&lt; 10 ; ++i) vec.push_back(i);
  for(auto i : vec)
  {
    auto j = i.increaseBy(1);
    for(j : vec) cout &lt;&lt; i &lt;&lt; j &lt;&lt; "\n";
  }
  </code></pre>
  
  <p>in this question, i'm interested if there is more to syntax of range-loops than just a simple way to iterate over elements. there isn't much documentation on c++11.</p>