title: implicit instantiation of undefined template "std::__1::basic_istringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >"
body: <p>I am learning C++ and following a tutorial, but got issue with building the code in the starter code. </p>
  
  <p>Here's the source code file where this error is being thrown. </p>
  
  <pre><code>#include "linux_parser.h"
  
  #include &lt;dirent.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;istream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  using std::stof;
  using std::string;
  using std::to_string;
  using std::vector;
  
  // DONE: An example of how to read data from the filesystem
  string LinuxParser::OperatingSystem() {
    string line;
    string key;
    string value;
    std::ifstream filestream(kOSPath);
    if (filestream.is_open()) {
      while (std::getline(filestream, line)) {
        std::replace(line.begin(), line.end(), ' ', '_');
        std::replace(line.begin(), line.end(), '=', ' ');
        std::replace(line.begin(), line.end(), '"', ' ');
        std::istringstream linestream(line);
        while (linestream &gt;&gt; key &gt;&gt; value) {
          if (key == "PRETTY_NAME") {
            std::replace(value.begin(), value.end(), '_', ' ');
            return value;
          }
        }
      }
    }
    return value;
  }
  </code></pre>
  
  <p>Following is the error thrown when I run <code>make build</code> locally on mac Catalina.</p>
  
  <pre><code>Scanning dependencies of target monitor
  [ 12%] Building CXX object CMakeFiles/monitor.dir/src/format.cpp.o
  [ 25%] Building CXX object CMakeFiles/monitor.dir/src/linux_parser.cpp.o
  /Users/Documents/github/cpp/src/linux_parser.cpp:25:26: error: implicit instantiation of undefined template
        'std::__1::basic_istringstream&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;'
        std::istringstream linestream(line);
                           ^
  /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:133:32: note: template is declared here
      class _LIBCPP_TEMPLATE_VIS basic_istringstream;
                                 ^
  /Users/Documents/github/cpp/src/linux_parser.cpp:44:24: error: implicit instantiation of undefined template
        'std::__1::basic_istringstream&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;'
      std::istringstream linestream(line);
                         ^
  /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:133:32: note: template is declared here
      class _LIBCPP_TEMPLATE_VIS basic_istringstream;
                                 ^
  2 errors generated.
  make[3]: *** [CMakeFiles/monitor.dir/src/linux_parser.cpp.o] Error 1
  make[2]: *** [CMakeFiles/monitor.dir/all] Error 2
  make[1]: *** [all] Error 2
  make: *** [build] Error 2
  </code></pre>