[all-commits] [llvm/llvm-project] 7fb9f9: [libc++][format] Adds bool formatter.

mordante via All-commits all-commits at lists.llvm.org
Thu Oct 7 08:17:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7fb9f99f3bb645337b4f4e6a2a3515219be82011
      https://github.com/llvm/llvm-project/commit/7fb9f99f3bb645337b4f4e6a2a3515219be82011
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2021-10-07 (Thu, 07 Oct 2021)

  Changed paths:
    M libcxx/docs/Status/Cxx20Papers.csv
    M libcxx/include/CMakeLists.txt
    A libcxx/include/__format/formatter_bool.h
    M libcxx/include/format
    M libcxx/include/module.modulemap
    A libcxx/test/libcxx/diagnostics/detail.headers/format/formatter_bool.module.verify.cpp
    A libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
    M libcxx/test/std/utilities/format/format.formatter/format.context/format.formatter.spec/formatter.bool.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/format_tests.h
    M libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/format_to.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
    M libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list