title: Read file into std::vector<std::byte>
body: <p>I'm trying to read a file in binary format into a <code>std::vector&lt;std::byte&gt;</code></p>
  
  <pre><code>  std::ifstream fStream(fName, std::ios::binary);
  
    std::vector&lt;std::byte&gt; file_content((std::istreambuf_iterator&lt;std::byte&gt;(fStream)),
                                          std::istreambuf_iterator&lt;std::byte&gt;());
  </code></pre>
  
  <p>but I'm getting this error (which to me looks like <code>istreambuf_iterator</code> is missing an overload for <code>std::byte</code>)</p>
  
  <pre><code>error: no matching function for call to ‘std::istreambuf_iterator&lt;std::byte&gt;::istreambuf_iterator(std::ifstream&amp;)’
       std::vector&lt;std::byte&gt; file_content((std::istreambuf_iterator&lt;std::byte&gt;(fStream)),
  </code></pre>
  
  <p>Am I doing something wrong ? And if yes what is the best way to do this ?</p>
  
  <p>Thanks!</p>