HomePhabricator

[libc++] Enable `explicit` conversion operators, even in C++03 mode.

Authored by arthur.j.odwyer on Jun 15 2021, 9:57 AM.

Description

[libc++] Enable explicit conversion operators, even in C++03 mode.

C++03 didn't support explicit conversion operators;
but Clang's C++03 mode does, as an extension, so we can use it.
This lets us make the conversion explicit in std::function (even in '03),
and remove some silly metaprogramming in std::basic_ios.

Drive-by improvements to the tests for these operators, in addition
to making sure all these tests also run in c++03 mode.

Differential Revision: https://reviews.llvm.org/D104682