As discussed on cfe-dev , use the using_if_exists Clang attribute when
the compiler supports it. This makes it easier to port libc++ on top of
new platforms that don't fully support the C Standard library.
Previously, libc++ would fail to build when trying to import a missing
declaration in a <cXXXX> header. With the attribute, the declaration will
simply not be imported into namespace std, and hence it won't be available
for libc++ to use. In many cases, the declarations were *not* actually
required for libc++ to work, so not importing them into namespace std is
The same thing could be achieved by conscious usage of #ifdef along
with platform detection, however that quickly creates a maintenance
problem as libc++ is ported to new platforms.