Skip to content

P2319R5 Prevent path presentation problems #7995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,9 @@
Equivalent to: \tcode{return visit(std::forward<Visitor>(vis), arg.value);}
\end{itemdescr}

\rSec1[depr.fs.path.factory]{Deprecated filesystem path factory functions}
\rSec1[depr.filesystems]{Deprecated file systems}

\rSec2[depr.fs.path.factory]{Deprecated filesystem path factory functions}

\pnum
The header \libheaderrefx{filesystem}{fs.filesystem.syn} has the following additions:
Expand Down Expand Up @@ -841,6 +843,45 @@
\end{note}
\end{itemdescr}

\rSec2[depr.fs.path.obs]{Deprecated filesystem path format observers}

\indexlibraryglobal{path}%
\pnum
The following members are declared in addition to those members specified in
\iref{fs.path.member}:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be \ref, not \iref, right?


\begin{codeblock}
namespace std::filesystem {
class path {
public:
std::string string() const;
std::string generic_string() const;
};
}
\end{codeblock}

\indexlibrarymember{string}{path}%
\begin{itemdecl}
std::string string() const;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
\tcode{system_encoded_string()}.
\end{itemdescr}

\indexlibrarymember{generic_string}{path}%
\begin{itemdecl}
std::string generic_string() const;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
\tcode{generic_system_encoded_string()}.
\end{itemdescr}

\rSec1[depr.atomics]{Deprecated atomic operations}

\rSec2[depr.atomics.general]{General}
Expand Down
43 changes: 37 additions & 6 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13707,7 +13707,8 @@
class Allocator = allocator<EcharT>>
basic_string<EcharT, traits, Allocator>
string(const Allocator& a = Allocator()) const;
std::string string() const;
std::string display_string() const;
std::string system_encoded_string() const;
std::wstring wstring() const;
std::u8string u8string() const;
std::u16string u16string() const;
Expand All @@ -13718,7 +13719,8 @@
class Allocator = allocator<EcharT>>
basic_string<EcharT, traits, Allocator>
generic_string(const Allocator& a = Allocator()) const;
std::string generic_string() const;
std::string generic_display_string() const;
std::string generic_system_encoded_string() const;
std::wstring generic_wstring() const;
std::u8string generic_u8string() const;
std::u16string generic_u16string() const;
Expand Down Expand Up @@ -14689,13 +14691,13 @@
\ref{fs.path.cvt}.
\end{itemdescr}

\indexlibrarymember{string}{path}%
\indexlibrarymember{system_encoded_string}{path}%
\indexlibrarymember{wstring}{path}%
\indexlibrarymember{u8string}{path}%
\indexlibrarymember{u16string}{path}%
\indexlibrarymember{u32string}{path}%
\begin{itemdecl}
std::string string() const;
std::string system_encoded_string() const;
std::wstring wstring() const;
std::u8string u8string() const;
std::u16string u16string() const;
Expand All @@ -14713,6 +14715,20 @@
by \ref{fs.path.cvt}.
\end{itemdescr}

\indexlibrarymember{display_string}{path}%
\begin{itemdecl}
std::string display_string() const;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
\tcode{format("{}", *this)}.
\begin{note}
The returned string is suitable for use with formatting\iref{format.functions}
and print functions\iref{print.fun}.
\end{note}
\end{itemdescr}

\rSec4[fs.path.generic.obs]{Generic format observers}

Expand Down Expand Up @@ -14752,13 +14768,13 @@
\ref{fs.path.cvt}.
\end{itemdescr}

\indexlibrarymember{generic_string}{path}%
\indexlibrarymember{generic_system_encoded_string}{path}%
\indexlibrarymember{generic_wstring}{path}%
\indexlibrarymember{generic_u8string}{path}%
\indexlibrarymember{generic_u16string}{path}%
\indexlibrarymember{generic_u32string}{path}%
\begin{itemdecl}
std::string generic_string() const;
std::string generic_system_encoded_string() const;
std::wstring generic_wstring() const;
std::u8string generic_u8string() const;
std::u16string generic_u16string() const;
Expand All @@ -14775,6 +14791,21 @@
Conversion, if any, is specified by~\ref{fs.path.cvt}.
\end{itemdescr}

\indexlibrarymember{generic_display_string}{path}%
\begin{itemdecl}
std::string generic_display_string() const;
\end{itemdecl}

\begin{itemdescr}
\pnum
\returns
\tcode{format("{:g}", *this)}.
\begin{note}
The returned string is suitable for use with formatting\iref{format.functions}
and print functions\iref{print.fun}.
\end{note}
\end{itemdescr}

\rSec4[fs.path.compare]{Compare}

\indexlibrarymember{compare}{path}%
Expand Down
2 changes: 1 addition & 1 deletion source/support.tex
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@
#define @\defnlibxname{cpp_lib_flat_set}@ 202207L // also in \libheader{flat_set}
#define @\defnlibxname{cpp_lib_format}@ 202311L // also in \libheader{format}
#define @\defnlibxname{cpp_lib_format_ranges}@ 202207L // also in \libheader{format}
#define @\defnlibxname{cpp_lib_format_path}@ 202403L // also in \libheader{filesystem}
#define @\defnlibxname{cpp_lib_format_path}@ 202506L // also in \libheader{filesystem}
#define @\defnlibxname{cpp_lib_format_uchar}@ 202311L // also in \libheader{format}
#define @\defnlibxname{cpp_lib_formatters}@ 202302L // also in \libheader{stacktrace}, \libheader{thread}
#define @\defnlibxname{cpp_lib_forward_like}@ 202207L // freestanding, also in \libheader{utility}
Expand Down