#include <string>
#include <iostream>
#include <boost/foreach.hpp>

template<typename I>
struct subseq {
  typedef typename I::iterator iterator;
  typedef typename I::const_iterator const_iterator;

  iterator a, b;

  subseq(typename I::iterator first, typename I::iterator second) : a(first), b(second) {}

  iterator begin() const { return a; }
  iterator end() const { return b; }
};

int main()
{
    std::string hello( "Hello, world!" );
    subseq<std::string> substr(hello.begin()+1, hello.end());

    BOOST_FOREACH( char ch, substr )
    {
        std::cout << ch;
    }

    return 0;
}