title: error: 'std::string_view' has not been declared
body: <p>I am trying to compile an example problem from a book.</p>
  
  <p>I got errors when I compiled on my system, so I tried an online compiler and it worked. I updated g++ to version 9 and tried again, but it still won't compile. 
  I get the error <code>'std::string_view' has not been declared</code>.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>// Sorting words recursively
  #include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;memory&gt;
  #include &lt;string&gt;
  #include &lt;string_view&gt;
  #include &lt;vector&gt;
  
  using Words = std::vector&lt;std::shared_ptr&lt;std::string&gt;&gt;;
  
  // Function prototypes
  void swap(Words&amp; words, size_t first, size_t second);
  void sort(Words&amp; words);
  void sort(Words&amp; words, size_t start, size_t end);
  void extract_words(Words&amp; words, std::string_view text, std::string_view separators);
  void show_words(const Words&amp; words);
  size_t max_word_length(const Words&amp; words);
  </code></pre>
  
  <p>First error occurs in the <code>extract_words</code> prototype, and all attempts after that to use the <code>text</code> parameter, or any use of <code>std::string_view</code>, causes an error.</p>