This adds an inline wrapper for std::terminate that doesn't add the declaration of std::terminate to namespace std. This allows the library to terminate without including all of . libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h: Remove unused header. * include/bits/c++config (std:__terminate): Define. * include/bits/semaphore_base.h: Remove and use __terminate instead of terminate. * include/bits/std_thread.h: Likewise. * libsupc++/eh_terminate.cc (std::terminate): Use qualified-id to call __cxxabiv1::__terminate. This avoids including a few thousand lines of just for one function declaration. Any objections or better ideas?