Ivan Lazaric
642020ab7e
libstdc++: implement formatter for std::filesystem::path
...
This patch implements formatting for std::filesystem::path from P2845R8,
and defines the feature test macro __cpp_lib_format_path to 202403L,
provided only in <filesystem>.
Formatting options are performed (if applicable) in order:
'g', '?', transcoding, fill-and-align & width
The standard specifies transcoding behaviour only when literal encoding
is UTF-8, leaving all other cases implementation defined.
Current implementation of filesystem::path assumes:
* char encoding is UTF-8
* wchar_t encoding is either UTF-32 or UTF-16
libstdc++-v3/ChangeLog:
* include/bits/fs_path.h: Include bits/formatfwd.h.
(std::formatter<filesystem::path, _CharT>): Define.
* include/bits/version.def (format_path): Define.
* include/bits/version.h: Regenerate.
* include/std/filesystem: Expose __cpp_lib_format_path.
* testsuite/std/format/fs_path.cc: New test.
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com >
Signed-off-by: Ivan Lazaric <ivan.lazaric1@gmail.com >
Co-authored-by: Jonathan Wakely <jwakely@redhat.com >
2026-02-16 12:34:18 +01:00
..
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-10 11:51:03 +01:00
2026-01-02 09:56:11 +01:00
2026-01-09 19:18:21 +00:00
2026-01-12 11:38:58 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-10 10:05:30 +00:00
2026-01-02 09:56:11 +01:00
2025-12-05 12:15:08 -05:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2025-12-19 14:00:07 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-10 10:05:30 +00:00
2026-01-02 09:56:11 +01:00
2025-06-02 13:52:35 +02:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-19 10:17:47 +01:00
2025-12-11 19:54:44 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-16 12:34:18 +01:00
2026-01-02 09:56:11 +01:00
2026-02-11 17:54:09 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-11 17:54:09 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-06 14:06:46 +01:00
2026-01-02 09:56:11 +01:00
2025-10-08 17:06:20 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-15 10:17:43 -05:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2025-06-02 13:52:35 +02:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-03 15:15:52 -05:00
2026-01-07 15:07:33 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-09 20:43:16 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-19 12:09:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-09 20:04:12 -05:00
2026-02-12 15:17:57 -05:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-09 20:04:12 -05:00
2026-02-11 11:00:03 +00:00
2025-12-08 18:55:02 +00:00
2026-01-09 19:18:21 +00:00
2026-01-02 09:56:11 +01:00
2026-01-28 10:28:09 +00:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-07 15:07:33 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-11 17:54:09 +01:00
2026-01-13 19:14:26 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-04 17:39:51 -05:00
2026-02-04 17:39:51 -05:00
2026-02-04 17:39:51 -05:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-04 17:39:51 -05:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-06 14:06:46 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2025-10-08 18:02:39 +02:00
2025-11-14 18:27:01 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-04 17:39:51 -05:00
2026-02-04 17:39:51 -05:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-01-02 09:56:11 +01:00
2026-02-16 12:34:18 +01:00
2026-02-16 12:34:18 +01:00
2026-01-02 09:56:11 +01:00