llvm-project/libcxx/test/std/utilities
Mark de Wever d7444d9f41 [libc++][format] Implement formatters.
This implements the initial version of the `std::formatter` class and its specializations. It also implements the following formatting functions:
- `format`
- `vformat`
- `format_to`
- `vformat_to`
- `format_to_n`
- `formatted_size`

All functions have a `char` and `wchar_t` version. Parsing the format-spec and
using the parsed format-spec hasn't been implemented. The code isn't optimized,
neither for speed, nor for size.

The goal is to have the rudimentary basics working, which can be used as a
basis to improve upon. The formatters used in this commit are simple stubs that
will be replaced by real formatters in later commits.

The formatters that are slated to be replaced in this patch series don't have
an availability macro to avoid merge conflicts.

Note the formatter for `bool` uses `0` and `1` instead of "false" and
"true". This will be fixed when the stub is replaced with a real
formatter.

Implements parts of:
- P0645 Text Formatting

Completes:
- LWG3539 format_to must not copy models of output_iterator<const charT&>

Reviewed By: ldionne, #libc, vitaut

Differential Revision: https://reviews.llvm.org/D96664
2021-09-04 11:41:08 +02:00
..
allocator.adaptor [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
any [libcxx][type_traits] remove `std::is_literal_type` and `std::result_of` for C++20 2021-07-02 17:10:19 +00:00
charconv [runtimes] Simplify how we specify XFAIL & friends based on the triple 2021-07-01 14:03:30 -04:00
format [libc++][format] Implement formatters. 2021-09-04 11:41:08 +02:00
function.objects [libc++] Remove test-suite annotations for unsupported Clang versions 2021-08-20 15:05:13 -04:00
intseq [libcxx][modularisation] splits `<utility>` into self-contained headers 2021-06-25 00:29:01 +00:00
memory [libc++] Remove test-suite annotations for unsupported Clang versions 2021-08-20 15:05:13 -04:00
meta [libc++][NFC] Remove uses of 'using namespace std;' in the test suite 2021-09-03 13:15:10 -04:00
optional [libc++] Remove test-suite annotations for unsupported Clang versions 2021-08-20 15:05:13 -04:00
ratio [libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markup 2020-04-15 10:53:37 -04:00
smartptr/unique.ptr [libc++] Remove Lit annotations for unsupported GCC versions from the test suite 2021-08-12 13:30:47 -04:00
template.bitset [libcxx][test] Silence false positive MSVC /analyze warning 2021-01-29 10:05:14 -08:00
time [libc++] Remove test-suite annotations for unsupported Clang versions 2021-08-20 15:05:13 -04:00
tuple [libc++] Remove test-suite annotations for unsupported Clang versions 2021-08-20 15:05:13 -04:00
type.index [libcxx][modularisation] splits `<utility>` into self-contained headers 2021-06-25 00:29:01 +00:00
utilities.general Support tests in freestanding 2019-02-04 20:31:13 +00:00
utility [libc++] Remove workarounds for the lack of deduction guides in C++17 2021-08-18 08:57:25 -04:00
utility.requirements [libc++] Remove useless nothing_to_do.pass.cpp tests 2020-04-03 13:48:34 -04:00
variant [libc++] Remove more test-suite workarounds for unsupported GCC versions 2021-08-20 13:26:43 -04:00