[libcxx-commits] [PATCH] D121530: [WIP][libc++][format] Implement format-string.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 9 09:32:07 PDT 2022
Mordante added inline comments.
================
Comment at: libcxx/include/format:518
+template <class... _Args>
+using __format_string = __basic_format_string<char, type_identity_t<_Args>...>;
+
----------------
This code is commented out, due to an issue with the MinGW/Clang-cl compiler (https://buildkite.com/llvm-project/libcxx-ci/builds/10114). It issues the diagnostic:
```
C:/ws/w32-1/llvm-project/libcxx-ci/build/clang-cl-dll/include/c++/v1\format(518,23): error: expected unqualified-id
using __format_string = __basic_format_string<char, type_identity_t<_Args>...>;
^
```
This code is the exact wording in the Standard.
Since this is exposition only it's acceptable to remove this code, but https://wg21.link/P2508 intends to make this exposition only part non-exposition only. (This paper is ready for the next plenary and might be backported to C++20.)
I'll have to investigate why this fails.
================
Comment at: libcxx/include/format:641
template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t formatted_size(string_view __fmt,
+_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t formatted_size(__basic_format_string<char, type_identity_t<_Args>...> __fmt,
const _Args&... __args) {
----------------
This overly long line has been formatted locally and will be part of the next iteration of this patch. Similar for other overly long lines with `__basic_format_string`. (No need to rerun the CI for formatting changes.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121530/new/
https://reviews.llvm.org/D121530
More information about the libcxx-commits
mailing list