title: Reading a boost::variant type from istream
body: <p>I was going through <code>boost::variant</code> and wondering how can I make following to work ?</p>
  
  <pre><code>typedef boost::variant&lt;int,std::string&gt; myval;
  int main()
  {
  
  std::vector&lt;myval&gt; vec;
  
  std::ifstream fin("temp.txt");
  
  //How following can be achieved ?
  std::copy(std::istream_iterator&lt;myval&gt;(fin), //Can this be from std::cin too ?
            std::istream_iterator&lt;myval&gt;(),
            std::back_inserter(vec));   
  }
  </code></pre>
  
  <p>For classes data members we have option to overload <code>&gt;&gt;</code> operator, but how to do this with <code>myval</code> ? </p>