title: Range-based for loop on vector that is a member variable
body: <p>C++11 </p>
  
  <p>What's the code to iterate, using range-based for loop, over a std::vector that is a member of a class? I I've tried a few versions of the following:</p>
  
  <pre><code>struct Thingy {
    typedef std::vector&lt;int&gt; V;
  
    V::iterator begin() {
        return ids.begin();
    }
  
    V::iterator end() {
        return ids.end();
    }
  
    private:
        V ids;
  };
  
  // This give error in VS2013
  auto t = new Thingy; // std::make_unique()
  for (auto&amp; i: t) {
      // ...
  }
  
  // ERROR: error C3312: no callable 'begin' function found for type 'Thingy *'
  // ERROR: error C3312: no callable 'end' function found for type 'Thingy *'
  </code></pre>