[all-commits] [llvm/llvm-project] 0922ce: [libc++][format] Add __format_arg_store.

mordante via All-commits all-commits at lists.llvm.org
Wed Sep 1 10:45:16 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0922ce56f4f04fbcacead6cdf0416341fe44e4bb
      https://github.com/llvm/llvm-project/commit/0922ce56f4f04fbcacead6cdf0416341fe44e4bb
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M libcxx/docs/Status/Cxx20Issues.csv
    M libcxx/docs/Status/Format.rst
    M libcxx/include/CMakeLists.txt
    M libcxx/include/__availability
    A libcxx/include/__format/format_arg.h
    A libcxx/include/__format/format_args.h
    A libcxx/include/__format/format_context.h
    A libcxx/include/__format/format_fwd.h
    M libcxx/include/concepts
    M libcxx/include/format
    M libcxx/include/module.modulemap
    M libcxx/include/type_traits
    A libcxx/test/libcxx/diagnostics/detail.headers/format/format_arg.module.verify.cpp
    A libcxx/test/libcxx/diagnostics/detail.headers/format/format_args.module.verify.cpp
    A libcxx/test/libcxx/diagnostics/detail.headers/format/format_context.module.verify.cpp
    A libcxx/test/libcxx/diagnostics/detail.headers/format/format_fwd.module.verify.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg.store/class.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.args/ctor.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.args/get.pass.cpp
    A libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.context/types.compile.pass.cpp
    A libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp
    A libcxx/test/support/test_basic_format_arg.h
    A libcxx/test/support/test_format_context.h

  Log Message:
  -----------
  [libc++][format] Add __format_arg_store.

This implements the struct `__format_arg_store` and its dependencies:
* the class basic_format_arg,
* the class basic_format_args,
* the class basic_format_context,
* the function make_format_args,
* the function wmake_format_args,
* the function visit_format_arg,
* several Standard required typedefs.

The following parts will be implemented in a later patch:

* the child class `basic_format_arg::handle`,
* the function `basic_format_arg::basic_format_arg(const T* p)`.

The following extension has been implemented:
* the class basic_format_arg supports `__[u]int128_t` on platform where libc++ supports 128 bit integrals.

Implements parts of:
* P0645 Text Formatting

Completes:
* LWG3371 visit_format_arg and make_format_args are not hidden friends
* LWG3542 basic_format_arg mishandles basic_string_view with custom traits

Note https://mordante.github.io/blog/2021/06/05/format.html gives a bit more information about the goals and non-goals of this initial patch series.

Reviewed By: #libc, ldionne, vitaut

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




More information about the All-commits mailing list