, , :
#if defined(__clang__)
# if __has_include(<__config>) // defines _LIBCPP_VERSION
# include <__config>
# elif __has_include(<bits/c++config.h>) // defines __GLIBCXX__
# include <bits/c++config.h>
# else
# include <ios>
# endif
#elif defined(__GNUC__)
# include <ios> // ios should include the c++config.h which defines __GLIBCXX__
#endif
, .
libc++ _LIBCPP_VERSION stdc++ __GLIBCXX__ , , , . , , .
: stdc++ __GLIBCPP__ . ++ 11, .
Clang (Edit: Standard ++ 17) __has_include , , , , , ., <ios> , . , - ( gcc linux):
grep -Rl '#include <bits/c++config.h>' /usr/include/c++
, , , .
/ , , , :
#ifdef __GLIBCXX__
std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
#endif