title: Linker error with clang++ for some standard library classes
body: <p>I am facing a weird linker issue with clang++ - it is able to find the definition of std::string class but not of std::ios_base::failure class.</p>
  
  <pre><code>$ cat foo.cpp
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
     std::string msg = "hello world";
     std::ios_base::failure f(msg);
     std::cout &lt;&lt; msg &lt;&lt; std::endl;
     return 0;
  }
  
  $ clang++ foo.cpp
  /tmp/foo-b77625.o: In function `main':
  foo.cpp:(.text+0x4d): undefined reference to `std::ios_base::failure::failure(std::__cxx11::basic_string&lt;char,  std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
  clang-3.7: error: linker command failed with exit code 1 (use -v to see  invocation)
  
  $ clang++ --version
  clang version 3.7.0 (trunk 239466)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix
  </code></pre>
  
  <p>I noticed that if I comment the instantiation of std::ios_base::failure, the program links (and executes) correctly.</p>
  
  <pre><code>$ clang++ foo.cpp &amp;&amp; ./a.out
  hello world
  </code></pre>
  
  <p>Can someone please help me understand this behavior and how to fix it?</p>
  
  <p>P.S. I observed the same behavior with clang version 3.6.0 as well.</p>