title: refactor c++ auto loops to use begin, end, operator++
body: <p>Is there any way to refactor this:</p>
  <pre><code>for (auto it: container) { ... }
  </code></pre>
  <p>Into what it actually represents:</p>
  <pre><code>for (auto it=container.begin(); it != container.end(); ++it) { ... }
  </code></pre>
  <p>Since under the hood this is what happens, I wonder if there's a way to translate the former style to the latter</p>
  <pre><code>#include &lt;iostream&gt;
  struct SomeClass {
      int x[5] = {1,2,3,4,5};
      int *begin() { return x+1; }
      int *end()   { return x+4; }
  };
  int main(int argc, char **argv)
  {
      SomeClass c;
      for (auto it: c) { std::cout &lt;&lt; it &lt;&lt; &quot;\n&quot;; }
      return 0;
  }
  </code></pre>