title: No exception while converting a string with alphabets after decimal point using stod()
body: <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  using namespace std;
  
  int main()
  {
      double var;
      string word("20.njhggh");
      var = stod(word);
      cout &lt;&lt; var &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>ouput is: <code>20</code></p>
  
  <p>The <code>stod</code> function does not thow a exception for input <code>"20.njhggh"</code>. It just ignores the letters after decimal point.
  How do I trow exception for the above case</p>