title: C++: How to pass any iterable type as a function parameter
body: <p>As an exercise I'm trying to implement Python's <code>str.join</code> method in C++. I will eventually add the function as a method of the <code>std::string</code> class but I figure getting it to work is more of a priority. I've defined the function as follows:</p>
  <pre><code>template&lt;typename Iterable&gt;
  std::string join(const std::string sep, Iterable iter);
  </code></pre>
  <p>Is there any way that I can ensure that the Iterable type is actually iterable? E.g. I wouldn't want to receive an <code>int</code> or <code>char</code>..</p>