Skip to content

Commit

Permalink
[depr,input.output,future.syn] Improve indexing of enumerations
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer authored and tkoeppe committed Oct 20, 2024
1 parent a470ff8 commit 20fa26d
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 76 deletions.
17 changes: 8 additions & 9 deletions source/future.tex
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,12 @@
\pnum
The following type is defined
in addition to those specified in \libheaderref{limits}:
\indexlibraryglobal{float_denorm_style}%
\begin{codeblock}
namespace std {
enum float_denorm_style {
denorm_indeterminate = -1,
denorm_absent = 0,
denorm_present = 1
enum @\libglobal{float_denorm_style}@ {
@\libmember{denorm_indeterminate}{float_denorm_style}@ = -1,
@\libmember{denorm_absent}{float_denorm_style}@ = 0,
@\libmember{denorm_present}{float_denorm_style}@ = 1
};
}
\end{codeblock}
Expand Down Expand Up @@ -268,10 +267,10 @@
in addition to those specified in \ref{system.error.syn}:

\begin{codeblock}
no_message_available, // \tcode{ENODATA}
no_stream_resources, // \tcode{ENOSR}
not_a_stream, // \tcode{ENOSTR}
stream_timeout, // \tcode{ETIME}
@\libmember{no_message_available}{errc}@, // \tcode{ENODATA}
@\libmember{no_stream_resources}{errc}@, // \tcode{ENOSR}
@\libmember{not_a_stream}{errc}@, // \tcode{ENOSTR}
@\libmember{stream_timeout}{errc}@, // \tcode{ETIME}
\end{codeblock}

\pnum
Expand Down
104 changes: 52 additions & 52 deletions source/iostreams.tex
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@
ios_base& defaultfloat(ios_base& str);

// \ref{error.reporting}, error reporting
enum class io_errc {
stream = 1
enum class @\libglobal{io_errc}@ {
@\libmember{stream}{io_errc}@ = 1
};

template<> struct is_error_code_enum<io_errc> : public true_type { };
Expand Down Expand Up @@ -831,7 +831,7 @@
virtual ~ios_base();

// \ref{ios.base.callback}, callbacks
enum event { erase_event, imbue_event, copyfmt_event };
enum @\libmember{event}{ios_base}@ { erase_event, imbue_event, copyfmt_event };
using event_callback = void (*)(event, ios_base&, int idx);
void register_callback(event_callback fn, int idx);

Expand Down Expand Up @@ -15696,24 +15696,24 @@
\lhdr{Constant} &
\rhdr{Meaning} \\ \capsep

\tcode{none} &
\tcode{\libmember{none}{file_type}} &
The type of the file has not been determined or an error occurred while
trying to determine the type. \\ \rowsep
\tcode{not_found} &
\tcode{\libmember{not_found}{file_type}} &
Pseudo-type indicating the file was not found.
\begin{tailnote}
The file
not being found is not considered an error while determining the
type of a file.
\end{tailnote}
\\ \rowsep
\tcode{regular} & Regular file \\ \rowsep
\tcode{directory} & Directory file \\ \rowsep
\tcode{symlink} & Symbolic link file \\ \rowsep
\tcode{block} & Block special file \\ \rowsep
\tcode{character} & Character special file \\ \rowsep
\tcode{fifo} & FIFO or pipe file \\ \rowsep
\tcode{socket} & Socket file \\ \rowsep
\tcode{\libmember{regular}{file_type}} & Regular file \\ \rowsep
\tcode{\libmember{directory}{file_type}} & Directory file \\ \rowsep
\tcode{\libmember{symlink}{file_type}} & Symbolic link file \\ \rowsep
\tcode{\libmember{block}{file_type}} & Block special file \\ \rowsep
\tcode{\libmember{character}{file_type}} & Character special file \\ \rowsep
\tcode{\libmember{fifo}{file_type}} & FIFO or pipe file \\ \rowsep
\tcode{\libmember{socket}{file_type}} & Socket file \\ \rowsep
\tcode{\textit{\impldef{additional \tcode{file_type} enumerators
for file systems supporting additional types of file}}} &
Implementations that support file systems having file types
Expand All @@ -15723,7 +15723,7 @@
for file systems supporting additional types of file}
\tcode{file_type} constants
to separately identify each of those additional file types \\ \rowsep
\tcode{unknown} &
\tcode{\libmember{unknown}{file_type}} &
The file exists but the type cannot be determined \\
\end{floattable}

Expand All @@ -15745,42 +15745,42 @@
\topline
\ohdrx{2}{Option group controlling \tcode{copy_file} function effects for existing target files} \\ \rowsep
\lhdr{Constant} & \rhdr{Meaning} \\ \capsep
\tcode{none} &
\tcode{\libmember{none}{copy_options}} &
(Default) Error; file already exists. \\ \rowsep
\tcode{skip_existing} &
\tcode{\libmember{skip_existing}{copy_options}} &
Do not overwrite existing file, do not report an error. \\ \rowsep
\tcode{overwrite_existing} &
\tcode{\libmember{overwrite_existing}{copy_options}} &
Overwrite the existing file. \\ \rowsep
\tcode{update_existing} &
\tcode{\libmember{update_existing}{copy_options}} &
Overwrite the existing file if it is older than the replacement file. \\ \capsep

\ohdrx{2}{Option group controlling \tcode{copy} function effects for subdirectories} \\ \rowsep
\lhdr{Constant} & \rhdr{Meaning} \\ \capsep
\tcode{none} &
\tcode{\libmember{none}{copy_options}} &
(Default) Do not copy subdirectories. \\ \rowsep
\tcode{recursive} &
\tcode{\libmember{recursive}{copy_options}} &
Recursively copy subdirectories and their contents. \\ \capsep

\ohdrx{2}{Option group controlling \tcode{copy} function effects for symbolic links} \\ \rowsep
\lhdr{Constant} & \rhdr{Meaning} \\ \capsep
\tcode{none} &
\tcode{\libmember{none}{copy_options}} &
(Default) Follow symbolic links. \\ \rowsep
\tcode{copy_symlinks} &
\tcode{\libmember{copy_symlinks}{copy_options}} &
Copy symbolic links as symbolic links rather than copying the files that
they point to. \\ \rowsep
\tcode{skip_symlinks} &
\tcode{\libmember{skip_symlinks}{copy_options}} &
Ignore symbolic links. \\ \capsep

\ohdrx{2}{Option group controlling \tcode{copy} function effects for choosing the form of copying} \\ \rowsep
\lhdr{Constant} & \rhdr{Meaning} \\ \capsep
\tcode{none} &
\tcode{\libmember{none}{copy_options}} &
(Default) Copy content. \\ \rowsep
\tcode{directories_only} &
\tcode{\libmember{directories_only}{copy_options}} &
Copy directory structure only, do not copy non-directory files. \\ \rowsep
\tcode{create_symlinks} &
\tcode{\libmember{create_symlinks}{copy_options}} &
Make symbolic links instead of copies of files. The source path shall be
an absolute path unless the destination path is in the current directory. \\ \rowsep
\tcode{create_hard_links} &
\tcode{\libmember{create_hard_links}{copy_options}} &
Make hard links instead of copies of files. \\
\end{floattable}

Expand All @@ -15799,46 +15799,46 @@
\lhdr{Name} & \chdr{Value} & \chdr{POSIX} & \rhdr{Definition or notes} \\
& \chdr{(octal)} & \chdr{macro} & \\ \capsep

\tcode{none} & \tcode{0} & &
\tcode{\libmember{none}{perms}} & \tcode{0} & &
There are no permissions set for the file. \\ \rowsep
\tcode{owner_read} & \tcode{0400} & \tcode{S_IRUSR} &
\tcode{\libmember{owner_read}{perms}} & \tcode{0400} & \tcode{S_IRUSR} &
Read permission, owner \\ \rowsep
\tcode{owner_write} & \tcode{0200} & \tcode{S_IWUSR} &
\tcode{\libmember{owner_write}{perms}} & \tcode{0200} & \tcode{S_IWUSR} &
Write permission, owner \\ \rowsep
\tcode{owner_exec} & \tcode{0100} & \tcode{S_IXUSR} &
\tcode{\libmember{owner_exec}{perms}} & \tcode{0100} & \tcode{S_IXUSR} &
Execute/search permission, owner \\ \rowsep
\tcode{owner_all} & \tcode{0700} & \tcode{S_IRWXU} &
\tcode{\libmember{owner_all}{perms}} & \tcode{0700} & \tcode{S_IRWXU} &
Read, write, execute/search by owner;\br
\tcode{owner_read | owner_write | owner_exec} \\ \rowsep
\tcode{group_read} & \tcode{040} & \tcode{S_IRGRP} &
\tcode{\libmember{group_read}{perms}} & \tcode{040} & \tcode{S_IRGRP} &
Read permission, group \\ \rowsep
\tcode{group_write} & \tcode{020} & \tcode{S_IWGRP} &
\tcode{\libmember{group_write}{perms}} & \tcode{020} & \tcode{S_IWGRP} &
Write permission, group \\ \rowsep
\tcode{group_exec} & \tcode{010} & \tcode{S_IXGRP} &
\tcode{\libmember{group_exec}{perms}} & \tcode{010} & \tcode{S_IXGRP} &
Execute/search permission, group \\ \rowsep
\tcode{group_all} & \tcode{070} & \tcode{S_IRWXG} &
\tcode{\libmember{group_all}{perms}} & \tcode{070} & \tcode{S_IRWXG} &
Read, write, execute/search by group;\br
\tcode{group_read | group_write | group_exec} \\ \rowsep
\tcode{others_read} & \tcode{04} & \tcode{S_IROTH} &
\tcode{\libmember{others_read}{perms}} & \tcode{04} & \tcode{S_IROTH} &
Read permission, others \\ \rowsep
\tcode{others_write} & \tcode{02} & \tcode{S_IWOTH} &
\tcode{\libmember{others_write}{perms}} & \tcode{02} & \tcode{S_IWOTH} &
Write permission, others \\ \rowsep
\tcode{others_exec} & \tcode{01} & \tcode{S_IXOTH} &
\tcode{\libmember{others_exec}{perms}} & \tcode{01} & \tcode{S_IXOTH} &
Execute/search permission, others \\ \rowsep
\tcode{others_all} & \tcode{07} & \tcode{S_IRWXO} &
\tcode{\libmember{others_all}{perms}} & \tcode{07} & \tcode{S_IRWXO} &
Read, write, execute/search by others;\br
\tcode{others_read | others_write | others_exec} \\ \rowsep
\tcode{all} & \tcode{0777} & &
\tcode{\libmember{all}{perms}} & \tcode{0777} & &
\tcode{owner_all | group_all | others_all} \\ \rowsep
\tcode{set_uid} & \tcode{04000} & \tcode{S_ISUID} &
\tcode{\libmember{set_uid}{perms}} & \tcode{04000} & \tcode{S_ISUID} &
Set-user-ID on execution \\ \rowsep
\tcode{set_gid} & \tcode{02000} & \tcode{S_ISGID} &
\tcode{\libmember{set_gid}{perms}} & \tcode{02000} & \tcode{S_ISGID} &
Set-group-ID on execution \\ \rowsep
\tcode{sticky_bit} & \tcode{01000} & \tcode{S_ISVTX} &
\tcode{\libmember{sticky_bit}{perms}} & \tcode{01000} & \tcode{S_ISVTX} &
Operating system dependent. \\ \rowsep
\tcode{mask} & \tcode{07777} & &
\tcode{\libmember{mask}{perms}} & \tcode{07777} & &
\tcode{all | set_uid | set_gid | sticky_bit} \\ \rowsep
\tcode{unknown} & \tcode{0xFFFF} & &
\tcode{\libmember{unknown}{perms}} & \tcode{0xFFFF} & &
The permissions are not known, such as when a \tcode{file_status} object
is created without specifying the permissions \\
\end{floattable}
Expand All @@ -15860,15 +15860,15 @@
\topline
\lhdr{Name} &
\rhdr{Meaning} \\ \capsep
\tcode{replace} &
\tcode{\libmember{replace}{perm_options}} &
\tcode{permissions} shall replace the file's permission bits with \tcode{perm} \\ \rowsep
\tcode{add} &
\tcode{\libmember{add}{perm_options}} &
\tcode{permissions} shall replace the file's permission bits with
the bitwise \logop{or} of \tcode{perm} and the file's current permission bits. \\ \rowsep
\tcode{remove} &
\tcode{\libmember{remove}{perm_options}} &
\tcode{permissions} shall replace the file's permission bits with
the bitwise \logop{and} of the complement of \tcode{perm} and the file's current permission bits. \\ \rowsep
\tcode{nofollow} &
\tcode{\libmember{nofollow}{perm_options}} &
\tcode{permissions} shall change the permissions of a symbolic link itself
rather than the permissions of the file the link resolves to. \\
\end{floattable}
Expand All @@ -15891,11 +15891,11 @@
\lhdr{Name} &
\rhdr{Meaning} \\ \capsep

\tcode{none} &
\tcode{\libmember{none}{directory_options}} &
(Default) Skip directory symlinks, permission denied is an error. \\ \rowsep
\tcode{follow_directory_symlink} &
\tcode{\libmember{follow_directory_symlink}{directory_options}} &
Follow rather than skip directory symlinks. \\ \rowsep
\tcode{skip_permission_denied} &
\tcode{\libmember{skip_permission_denied}{directory_options}} &
Skip directories that would otherwise result in permission denied. \\
\end{floattable}

Expand Down
28 changes: 13 additions & 15 deletions source/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8726,7 +8726,6 @@
\rSec2[condition.variable.syn]{Header \tcode{<condition_variable>} synopsis}

\indexheader{condition_variable}%
\indexlibraryglobal{cv_status}%
\begin{codeblock}
namespace std {
// \ref{thread.condition.condvar}, class \tcode{condition_variable}
Expand All @@ -8737,7 +8736,7 @@
// \ref{thread.condition.nonmember}, non-member functions
void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);

enum class cv_status { no_timeout, timeout };
enum class @\libglobal{cv_status}@ { @\libmember{no_timeout}{cv_status}@, @\libmember{timeout}{cv_status}@ };
}
\end{codeblock}

Expand Down Expand Up @@ -10349,26 +10348,25 @@
\rSec2[future.syn]{Header \tcode{<future>} synopsis}

\indexheader{future}%
\indexlibraryglobal{future_errc}%
\begin{codeblock}
namespace std {
enum class future_errc {
broken_promise = @\impdefx{value of \tcode{future_errc::broken_promise}}@,
future_already_retrieved = @\impdefx{value of \tcode{future_errc::future_already_retrieved}}@,
promise_already_satisfied = @\impdefx{value of \tcode{future_errc::promise_already_satisfied}}@,
no_state = @\impdefx{value of \tcode{future_errc::no_state}}@
enum class @\libglobal{future_errc}@ {
@\libmember{broken_promise}{future_errc}@ = @\impdefx{value of \tcode{future_errc::broken_promise}}@,
@\libmember{future_already_retrieved}{future_errc}@ = @\impdefx{value of \tcode{future_errc::future_already_retrieved}}@,
@\libmember{promise_already_satisfied}{future_errc}@ = @\impdefx{value of \tcode{future_errc::promise_already_satisfied}}@,
@\libmember{no_state}{future_errc}@ = @\impdefx{value of \tcode{future_errc::no_state}}@
};

enum class launch : @\unspec{}@ {
async = @\unspec{}@,
deferred = @\unspec{}@,
enum class @\libglobal{launch}@ : @\unspec{}@ {
@\libmember{async}{launch}@ = @\unspec{}@,
@\libmember{deferred}{launch}@ = @\unspec{}@,
@\impdefx{last enumerator of \tcode{launch}}@
};

enum class future_status {
ready,
timeout,
deferred
enum class @\libglobal{future_status}@ {
@\libmember{ready}{future_status}@,
@\libmember{timeout}{future_status}@,
@\libmember{deferred}{future_status}@
};

// \ref{futures.errors}, error handling
Expand Down

0 comments on commit 20fa26d

Please sign in to comment.