Commit Graph

3570 Commits

Author SHA1 Message Date
Louis Dionne a4ba780510 [libc++] Enable -Wformat-nonliteral when building libc++
Using user-provided data as a format string is a well known source of
security vulnerabilities. For this reason, it is a good idea to compile
our code with -Wformat-nonliteral, which basically warns if a non-constant
string is used as a format specifier. This is the compiler’s best signal
that a format string call may be insecure.

I audited the code after adding the warning and made sure that the few
places where we used a non-literal string as a format string were not
potential security issues. I either disabled the warning locally for
those instances or fixed the warning by using a literal. The idea is
that after we add the warning to the build, any new use of a non-literal
string in a format string will trigger a diagnostic, and we can either
get rid of it or disable the warning locally, which is a way of
acknowledging that it has been audited.

I also looked into enabling it in the test suite, which would perhaps
allow finding additional instances of it in our headers, however that
is not possible at the moment because Clang doesn't support putting
__attribute__((__format__(...))) on variadic templates, which would
be needed.

rdar://84571685

Differential Revision: https://reviews.llvm.org/D112927
2021-11-09 13:17:45 -05:00
Konstantin Varlamov 68072a7166 [libc++] P0433R2: test that deduction guides are properly SFINAEd away.
Deduction guides for containers should not participate in overload
resolution when called with certain incorrect types (e.g. when called
with a template argument in place of an `InputIterator` that doesn't
qualify as an input iterator). Similarly, class template argument
deduction should not select `unique_ptr` constructors that take a
a pointer.

The tests try out every possible incorrect parameter (but never more
than one incorrect parameter in the same invocation).

Also add deduction guides to the synopsis for associative and unordered
containers (this was accidentally omitted from [D112510](https://reviews.llvm.org/D112510)).

Differential Revision: https://reviews.llvm.org/D112904
2021-11-09 09:32:24 -08:00
Konstantin Varlamov 12b55821a5 [libc++][NFC] Inline most of `__vector_base` into `vector`.
`__vector_base` exists for historical reasons and cannot be eliminated
entirely without breaking the ABI. Member variables are left
untouched -- this patch only does changes that clearly cannot affect the
ABI.

Differential Revision: https://reviews.llvm.org/D112976
2021-11-08 00:45:48 -08:00
Konstantin Varlamov d7ab283996 Revert "[libc++] Always define a key function for std::bad_function_call in the dylib"
This reverts commit bc74231756. It was
committed accidentally.
2021-11-08 00:44:47 -08:00
Louis Dionne bc74231756 [libc++] Always define a key function for std::bad_function_call in the dylib
However, whether applications rely on the std::bad_function_call vtable
being in the dylib is still controlled by the ABI macro, since changing
that would be an ABI break.

Differential Revision: https://reviews.llvm.org/D92397
2021-11-08 00:31:00 -08:00
Arthur O'Dwyer c92a253cf0 [libc++] Fix hang in counting_semaphore::try_acquire
Before this patch, `try_acquire` blocks instead of returning false.
This is because `__libcpp_thread_poll_with_backoff` interprets zero
as meaning infinite, causing `try_acquire` to wait indefinitely.

Thanks to Pablo Busse (pabusse) for the patch!

Differential Revision: https://reviews.llvm.org/D98334
2021-11-05 15:57:46 -04:00
Daniel McIntosh 41481b7db5 [libcxx][NFC] tidy up money_get::__do_get's sign parsing
Same logic, but much easier to read this way

Reviewed By: ldionne, #libc, Mordante

Differential Revision: https://reviews.llvm.org/D112958
2021-11-04 17:55:28 -04:00
Arthur O'Dwyer d0eaf75320 [libc++] Remove non-atomic "platform" semaphore implementations.
These can't be made constexpr-constructible (constinit'able),
so they aren't C++20-conforming. Also, the platform versions are
going to be bigger than the atomic/futex version, so we'd have
the awkward situation that `semaphore<42>` could be bigger than
`semaphore<43>`, and that's just silly.

Differential Revision: https://reviews.llvm.org/D110110
2021-11-04 14:33:34 -04:00
Martin Storsjö 341cc1b411 [libcxx] Remove nonstandard _FilesystemClock::{to,from}_time_t
These are not standard methods, neither libstdc++ nor MSVC STL provide
them.

In practice, one of them was untested and the other one was only used in
one single test.

Differential Revision: https://reviews.llvm.org/D113027
2021-11-04 10:24:47 +02:00
Louis Dionne b889cbf366 [libc++] Refactor num_put::do_put to reduce duplication
I was going to make a change in that area of the code and I noticed that
we basically duplicated the same code 5 times to handle integral types
and floating point types. This commit simply pulls the duplication into
a function.

Differential Revision: https://reviews.llvm.org/D112830
2021-11-01 10:05:10 -04:00
Mark de Wever 5468dfb973 [libc++][format] Use preferred_name attribute.
This was suggested by @vitaut in D110494.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D112362
2021-10-30 12:51:56 +02:00
Mark de Wever 7ee5e7e97c [libc++] Remove Clang-11 support.
Since we no longer officially support Clang 11 remove the work-arounds
for this version.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D112727
2021-10-30 12:50:22 +02:00
Joe Loser 40a6be4346
[libc++] Ensure valid view for view_interface template parameter
Some types that inherit from `view_interface` do not meet the
preconditions. This came up during discussion
in https://reviews.llvm.org/D112631. Currently, the behavior is IFNDR,
but the preconditions can be easily checked, so let's do so.

In particular, we know each public member function calls the
`__derived()` private function, so we can do the check there. We
intentionally do it as a `static_assert` instead of a `requires` clause
to avoid hard erroring in some cases, such as with incomplete types. An
example hard error is:

```
llvm-project/build/include/c++/v1/__ranges/view_interface.h:48:14: note: because 'sizeof(_Tp)' would be invalid: invalid application of 'sizeof' to an incomplete type 'MoveOnlyForwardRange'
  requires { sizeof(_Tp); } &&
             ^
llvm-project/build/include/c++/v1/__ranges/view_interface.h:73:26: error: no matching member function for call to '__derived'
    return ranges::begin(__derived()) == ranges::end(__derived());
                         ^~~~~~~~~
llvm-project/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp:187:31: note: in instantiation of function template specialization 'std::ranges::view_interface<MoveOnlyForwardRange>::empty<Mov
eOnlyForwardRange>' requested here
  assert(!std::move(moveOnly).empty());
```

Reviewed By: Quuxplusone, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D112665
2021-10-29 19:04:54 -04:00
Arthur O'Dwyer 0412c007e3 [libc++] Implement LWG3369, tweak CTAD for std::span.
The original bug doesn't reproduce on Clang, allegedly because of
https://bugs.llvm.org/show_bug.cgi?id=44484
We already test STL's exact test case, in "span.cons/deduct.pass.cpp",
which I'm touching just for the heck of it.

Differential Revision: https://reviews.llvm.org/D111838
2021-10-29 14:15:41 -06:00
Xiang Gao de493a26b9 [libc++] Fix buggy numerics of tanh(complex) at inf
Because:
    lim[x->inf, tanh(x+iy)] = 1
    lim[x->-inf, tanh(x+iy)] = -1

See also https://github.com/NVIDIA/libcudacxx/pull/210

Differential Revision: https://reviews.llvm.org/D112252
2021-10-28 16:10:56 -04:00
Xiang Gao f21c247300 [libc++] Fix numeric of exp(complex) at inf
This fixes the bug that exp({501, 0}) returns {inf, nan} instead
of {inf, 0}.

Differential Revision: https://reviews.llvm.org/D112277
2021-10-28 16:10:55 -04:00
Joe Loser 93df7b9f75
[libc++][ABI Break] Make is_error_condition_enum_v and is_error_code_enum_v bool, not size_t
`is_error_condition_enum_v` and `is_error_code_enum_v` are currently of
type `size_t`, but the standard mandates they are of type `bool`.

This is an ABI break technically since the size of these variable
templates has changed. Document it as such in the release notes.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50755

Reviewed By: ldionne, Quuxplusone, #libc, var-const

Differential Revision: https://reviews.llvm.org/D112553
2021-10-28 15:38:17 -04:00
Konstantin Varlamov f9f97cae82 [libc++] P0433R2: add the remaining deduction guides.
Add deduction guides to `valarray` and `scoped_allocator_adaptor`. This largely
finishes implementation of the paper:

* deduction guides for other classes mentioned in the paper were
  implemented previously (see the list below);
* deduction guides for several classes contained in the proposal
  (`reference_wrapper`, `lock_guard`, `scoped_lock`, `unique_lock`,
  `shared_lock`) were removed by [LWG2981](https://wg21.link/LWG2981).

Also add deduction guides to the synopsis for the few classes (e.g. `pair`)
where they were missing.

The only part of the paper that isn't fully implemented after this patch is
making sure certain deduction guides don't participate in overload resolution
when given incorrect template parameters.

List of significant commits implementing the other parts of P0433 (omitting some
minor fixes):

* [pair](af65856eec)
* [basic_string](6d9f750dec)
* [array](0ca8c0895c)
* [deque](dbb6f8a817)
* [forward_list](e076700b77)
* [list](4a227e582b)
* [vector](df8f754792)
* [queue/stack/priority_queue](5b8b8b5dce)
* [basic_regex](edd5e29cfe)
* [optional](f35b4bc395)
* [map/multimap](edfe8525de)
* [set/multiset](e20865c387)
* [unordered_set/unordered_multiset](296a80102a)
* [unordered_map/unordered_multimap](dfcd4384cb)
* [function](e1eabcdfad)
* [tuple](1308011e1b)
* [shared_ptr/weak_ptr](83564056d4)

Additional notes:
* It was revision 2 of the paper that was voted into the Standard.
  P0433R3 is a separate paper that is not part of the Standard.
* The paper also mandates removing several `make_*_searcher` functions
  (e.g. `make_boyer_moore_searcher`) which are currently not implemented
  (except in `experimental/`).
* The `__cpp_lib_deduction_guides` feature test macro from the paper was
  accidentally omitted from the Standard.

Differential Revision: https://reviews.llvm.org/D112510
2021-10-28 11:09:51 -07:00
Louis Dionne 2999b7307f [libc++] Make __decay_copy constexpr
This is going to be necessary to implement some range adaptors.
As a fly-by fix, rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI
and remove a redundant inline keyword.

Differential Revision: https://reviews.llvm.org/D112650
2021-10-27 17:32:08 -04:00
Joe Loser 7ad00511e4
[libc++][NFC] Mark LWG2731 as complete
Mark LWG2731 as complete. The type alias `mutex_type` is only provided if
`scoped_lock` is given one mutex type and it has been implemented that
way since the beginning of Clang 5 it seems. There already are tests for
verifying existence (and lack thereof) for `mutex_type` type alias
depending on the number of mutex types, so there is nothing to
do for this LWG issue.

Reviewed By: Quuxplusone, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D112462
2021-10-26 13:46:00 -04:00
Louis Dionne b2d25ef2d1 [libc++] Implement shared_ptr methods inline in the class
This patch refactors the shared_ptr methods from being defined out-of-line
to being defined inline in the class, like what we do for all new code in
the library. The benefits of doing that are that code is not as scattered
around and is hence easier to understand, and it avoids a ton of duplication
due to SFINAE checks. Defining the method where it is declared also removes
the possibility for mismatched attributes.

As a fly-by change, this also:

- Adds a few _LIBCPP_HIDE_FROM_ABI attributes
- Uses __enable_if_t instead of enable_if as a function argument, to match
  the style that we use everywhere else.

Differential Revision: https://reviews.llvm.org/D112478
2021-10-26 13:11:10 -04:00
Joe Loser d081d75dc8
[libc++][NFC] Remove unimplemented parts of chrono synopsis
Several parts in the `chrono` synopsis for C++20 are not yet
implemented. The current recommendation is that things are added to the
synopsis when implemented -- not beforehand. As such, remove the
not-yet-implemented parts to avoid confusion.

Reviewed By: ldionne, Quuxplusone, #libc

Differential Revision: https://reviews.llvm.org/D111922
2021-10-25 11:16:40 -04:00
Konstantin Varlamov 065ac30026 [libc++] LWG3001: add `remove_extent_t` to `weak_ptr::element_type`.
Also fix a few places in the `shared_ptr` implementation where
`element_type` was passed to the `__is_compatible` helper. This could
result in `remove_extent` being applied twice to the pointer's template
type (first by the definition of `element_type` and then by the helper),
potentially leading to somewhat less readable error messages for some
incorrect code.

Differential Revision: https://reviews.llvm.org/D112092
2021-10-25 11:15:54 -04:00
Mark de Wever 7593f68a05 [libc++][nfc] Remove double spaces.
Based on the comment of @Quuxplusone in D111961. It seems no tests are
affected, but give it a run on the CI to be sure.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D112231
2021-10-22 17:26:13 +02:00
Mark de Wever 56df1d80e2 [libc++] Use addressof in vector.
This addresses the usage of `operator&` in `<vector>`.

I now added tests for the current offending cases. I wonder whether it
would be better to add one addressof test per directory and test all
possible violations. Also to guard against possible future errors?

(Note there are still more headers with the same issue.)

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D111961
2021-10-21 17:28:17 +02:00
Mikhail Maltsev 05a2d17668 [libcxx] Throw correct exception from std::vector::reserve
According to the standard [vector.capacity]/5, std::vector<T>::reserve
shall throw an exception of type std::length_error when the requested
capacity exceeds max_size().

This behavior is not implemented correctly: the function 'reserve'
simply propagates the exception from allocator<T>::allocate. Before
D110846 that exception used to be of type std::length_error (which is
correct for vector<T>::reserve, but incorrect for
allocator<T>::allocate).

This patch fixes the issue and adds regression tests.

Reviewed By: Quuxplusone, ldionne, #libc

Differential Revision: https://reviews.llvm.org/D112068
2021-10-21 10:40:48 +01:00
Mikhail Maltsev 49be23a1eb [libcxx] Support allocators with explicit c-tors in vector<bool>
std::vector<bool> rebinds the supplied allocator to construct objects
of type '__storage_type' rather than 'bool'. Allocators are allowed to
use explicit conversion constructors, so care must be taken when
performing conversions.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D112150
2021-10-21 10:38:56 +01:00
Muiez Ahmed 6b82adbb49 Raise compile error when using unimplemented functions
The path functions in this patch are unimplemented (as per the TODO comment from upstream). To avoid running into a linker error (missing symbol), this patch raises a compile error by commenting out the functions, which is more user friendly.

Differential Revision: https://reviews.llvm.org/D111892
2021-10-20 13:55:50 -04:00
Joe Loser 622c40722e
[libc++] Make __weekday_from_days private in weekday
`weekday` has a static member function `__weekday_from_days` which is
not part of the mandated public interface of `weeekday` according to the
standard. Since it is only used internally in the constructors of
`weekday`, let's make it private.

Reviewed By: ldionne, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D112072
2021-10-19 14:21:33 -04:00
Mikhail Maltsev be10b1f1cc [libcxx] Make allocator<T>:allocate throw bad_array_new_length
Currently the member functions std::allocator<T>::allocate,
std::experimental::pmr::polymorphic_allocator::allocate and
std::resource_adaptor<T>::do_allocate throw an exception of type
std::length_error when the requested size exceeds the maximum size.

According to the C++ standard ([allocator.members]/4,
[mem.poly.allocator.mem]/1), std::allocator<T>::allocate and
std::pmr::polymorphic_allocator::allocate must throw a
std::bad_array_new_length exception in this case.

The patch fixes the issue with std::allocator<T>::allocate and changes
the type the exception thrown by
std::experimental::pmr::resource_adaptor<T>::do_allocate to
std::bad_array_new_length as well for consistency.

The patch resolves LWG 3237, LWG 3038 and LWG 3190.

Reviewed By: ldionne, #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D110846
2021-10-18 19:12:42 +01:00
Louis Dionne 616a3cc01e [libc++] Add the std::views::reverse range adaptor
Differential Revision: https://reviews.llvm.org/D110426
2021-10-18 10:38:31 -04:00
Konstantin Varlamov a59c1a2138 [libc++] LWG3266: delete the to_chars(bool) overload.
This PR only updates the synopsis in `<charconv>` -- the current
implementation already [deletes](e9e6266c70/libcxx/include/charconv (L108))
the overload and has a [test](https://github.com/llvm/llvm-project/blob/main/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.bool.fail.cpp)
for it (and this has been the case from the first [commit](https://reviews.llvm.org/D41458)
where `<charconv>` was added).

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D111845
2021-10-15 17:52:58 +02:00
Joe Loser 1fa27f2a10
[libc++] LWG3480: make (recursive_)directory_iterator C++20 ranges
Implement LWG3480 which enables `directory_iterator` and
`recursive_directory_iterator` to be both a `borrowed_range` and a
`view`.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D111644
2021-10-14 12:02:18 -04:00
Mark de Wever 25a3463c44 [libc++][NFC] Fixes placement of the return type. 2021-10-14 17:40:45 +02:00
Joe Loser 8e92410ecc
[libc++][docs] Mark LWG3274 as complete
Mark LWG3274 as complete. The feature test macro `__cpp_lib_span` was added in
`6d2599e4f776d0cd88438cb82a00c4fc25cc3f67`.

https://wg21.link/p1024 mentions marking `span:::empty()` with
`[[nodiscard]]` which is not done yet. So, do that and add tests.

Reviewed By: ldionne, Quuxplusone, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D111516
2021-10-12 22:31:32 -04:00
Mark de Wever 968e27397c [libc++] Use addressof to fix debug tests.
Fixes the tests added in D110852 for the debug iterators.

Similar issues with hijacking `operator&` still exist, they will be
addressed separately.

Reviewed By: #libc, ldionne, Quuxplusone

Differential Revision: https://reviews.llvm.org/D111564
2021-10-12 18:15:35 +02:00
Mark de Wever a76e698787 [libc++] Update atomic synopsis and tests.
While looking at LWG-2988 and P0558 it seems the issues were already
implemented, but the synopsis wasn't updated. Some of the tests didn't
validate the `noexcept` status. A few tests were missing completely:
- `atomic_wait_explicit`
- `atomic_notify_one`
- `atomic_notify_all`

Mark P0558 as complete, didn't investigate which version of libc++ first
includes this. It seems the paper has been retroactively applied. I
couldn't find whether this is correct, but looking at cppreference it
seems intended.

Completes
- LWG-2988 Clause 32 cleanup missed one typename
- P0558 Resolving atomic<T> named base class inconsistencies

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D103765
2021-10-12 17:28:08 +02:00
Louis Dionne f4c1258d56 [libc++] Add an option to disable wide character support in libc++
Some embedded platforms do not wish to support the C library functionality
for handling wchar_t because they have no use for it. It makes sense for
libc++ to work properly on those platforms, so this commit adds a carve-out
of functionality for wchar_t.

Unfortunately, unlike some other carve-outs (e.g. random device), this
patch touches several parts of the library. However, despite the wide
impact of this patch, I still think it is important to support this
configuration since it makes it much simpler to port libc++ to some
embedded platforms.

Differential Revision: https://reviews.llvm.org/D111265
2021-10-12 06:08:23 -04:00
Joe Loser 0d450aa641
[libc++] P2401: conditional noexcept for std::exchange
Implement P2401 which adds a `noexcept` specification to
`std::exchange`. Treated as a defect fix which is the motivation for
applying this change to all standards mode rather than just C++23 or
later as the paper suggests.

Reviewed By: Quuxplusone, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D111481
2021-10-11 14:34:45 -04:00
Arthur O'Dwyer 3df094d31e [libc++] [P1614] Implement std::compare_three_way.
Differential Revision: https://reviews.llvm.org/D110735
2021-10-10 21:57:10 -04:00
Joe Loser e53c9251fa
[libc++] Remove empty namespace std in type_traits. NFCI.
There is an empty `namespace std` in `type_traits` which was originally
used when `std::byte` was added in
c97d8aa866. At some point, the bitwise operators
on `std::byte` got relocated but this empty namespace was left around.
Remove it.

Reviewed By: Quuxplusone, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D111512
2021-10-10 14:35:05 -04:00
Joe Loser 67964fc4b2
[libc++][NFC] Replace tab with whitespace in comment
There is a stray tab character in a comment block. Replace the tab
character with a space for consistency with other comments.
2021-10-10 12:53:35 -04:00
Mark de Wever dcbfceffde [libc++][nfc] Remove a duplicated include. 2021-10-10 14:21:01 +02:00
Mark de Wever a1f0f847ff [NFC][libc++] Update back_insert_iterator style.
As suggested in D110573 land the rename part separately.
2021-10-09 13:31:20 +02:00
Kent Ross b80f2dfd11 [libc++][spaceship] Implement std::tuple::operator<=>
Implement parts of P1614, including three-way comparison for tuples, and expand testing.

Reviewed By: ldionne, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D108250
2021-10-08 16:24:28 -07:00
Joe Loser 3a208c6894
[libc++] Implement P1394r4 for span: range constructor
Implement https://wg21.link/p1394 which allows span to be constructible
from any contiguous forwarding-range that has a compatible element type.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51443

Reviewed By: ldionne, Quuxplusone, #libc

Differential Revision: https://reviews.llvm.org/D110503
2021-10-08 17:00:39 -04:00
Mark de Wever aac5b84d4b [libc++] Improve atomic_fetch_(add|sub).*.
While looking at the review comments in D103765 there was an oddity in
the tests for the following functions:
- atomic_fetch_add
- atomic_fetch_add_explicit
- atomic_fetch_sub
- atomic_fetch_sub_explicit

Libc++ allows usage of
`atomic_fetch_add<int>(atomic<int*>*, atomic<int*>::difference_type);`
MSVC and GCC reject this code: https://godbolt.org/z/9d8WzohbE

This makes the atomic `fetch(add|sub).*` Standard conforming and removes the non-conforming extensions.

Fixes PR47908

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D103983
2021-10-08 17:41:57 +02:00
Mark de Wever b8608b8723 [libc++] Use addressof in assignment operator.
Replace `&__rhs` with `_VSTD::addressof(__rhs)` to guard against ADL hijacking
of `operator&` in `operator=`. Thanks to @CaseyCarter for bringing it to our
attention.

Similar issues with hijacking `operator&` still exist, they will be
addressed separately.

Reviewed By: #libc, Quuxplusone, ldionne

Differential Revision: https://reviews.llvm.org/D110852
2021-10-07 18:10:47 +02:00
Mark de Wever 7fb9f99f3b [libc++][format] Adds bool formatter.
Implements the formatter for Boolean types.
[format.formatter.spec]/2.3
For each charT, for each cv-unqualified arithmetic type ArithmeticT other
than char, wchar_t, char8_t, char16_t, or char32_t, a specialization
```
  template<> struct formatter<ArithmeticT, charT>;
```
This removes the stub implemented in D96664.

Implements parts of:
- P0645 Text Formatting
- P1652 Printf corner cases in std::format

Completes:
- P1868 width: clarifying units of width and precision in std::format

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D103670
2021-10-07 17:17:27 +02:00
Mark de Wever 49e736d845 [libc++][format] Adds char formatter.
Implements the formatter for all fundamental integer types.
[format.formatter.spec]/2.1
The specializations
```
  template<> struct formatter<char, char>;
  template<> struct formatter<char, wchar_t>;
  template<> struct formatter<wchar_t, wchar_t>;
```
This removes the stub implemented in D96664.

Implements parts of:
- P0645 Text Formatting

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D103466
2021-10-07 17:15:58 +02:00