title: How to make char16_t acceptable as a template parameter to basic_ifstream?
body: <p>I am using C++17 on macOS and <code>char16_t</code> is not acceptable as a template parameter as follow:</p>
  <pre><code>basic_ifstream&lt;char16_t&gt; file(&quot;c:\\file.txt&quot;, ios_base::ate);
  streamsize size = file.tellg();
  file.seekg(0, ios_base::beg);
  u16string str(size/2, 0);
  file.read(reinterpret_cast&lt;char16_t*&gt;(&amp;str[0]), size);
  file.close();
  </code></pre>
  <p>The previous code is working on windows but it doesn't work on macOS.</p>
  <p>Also, there are indirect error <code>implicit instantiation of undefined template std::__1::ctype&lt;char16_t&gt;</code> appears in &quot;istream.h&quot;, &quot;__locale.h&quot; and when change <code>char16_t</code> to something else that error disappear.</p>
  <p><strong>Is there a solution to that problem or it's like the other poor things that in c++?</strong></p>