diff --git a/source/diagnostics.tex b/source/diagnostics.tex index e421b207f4..6d9ff60a47 100644 --- a/source/diagnostics.tex +++ b/source/diagnostics.tex @@ -456,9 +456,8 @@ \rSec2[cassert.syn]{Header \tcode{} synopsis} -\indexlibraryglobal{assert}% \begin{codeblock} -#define assert(...) @\seebelow@ +#define @\libmacro{assert}@(...) @\seebelow@ \end{codeblock} \rSec2[assertions.assert]{The \tcode{assert} macro} @@ -468,11 +467,11 @@ at the point in the source file where \tcode{} is included, the \tcode{assert} macro is defined as \begin{codeblock} -#define assert(...) ((void)0) +#define @\libmacro{assert}@(...) ((void)0) \end{codeblock} \pnum -Otherwise, the \tcode{assert} macro puts a diagnostic test into programs; +Otherwise, the \libmacro{assert} macro puts a diagnostic test into programs; it expands to an expression of type \keyword{void} which has the following effects: @@ -522,7 +521,7 @@ \pnum The contents of the header \libheaderdef{cerrno} are the same as the POSIX header -\libheader{errno.h}, except that \tcode{errno} shall be defined as a macro. +\libheader{errno.h}, except that \libmacro{errno} shall be defined as a macro. \begin{note} The intent is to remain in close alignment with the POSIX standard. \end{note} @@ -530,158 +529,83 @@ \rSec2[cerrno.syn]{Header \tcode{} synopsis} -\indexlibraryglobal{errno}% -\indexlibraryglobal{E2BIG}% -\indexlibraryglobal{EACCES}% -\indexlibraryglobal{EADDRINUSE}% -\indexlibraryglobal{EADDRNOTAVAIL}% -\indexlibraryglobal{EAFNOSUPPORT}% -\indexlibraryglobal{EAGAIN}% -\indexlibraryglobal{EALREADY}% -\indexlibraryglobal{EBADF}% -\indexlibraryglobal{EBADMSG}% -\indexlibraryglobal{EBUSY}% -\indexlibraryglobal{ECANCELED}% -\indexlibraryglobal{ECHILD}% -\indexlibraryglobal{ECONNABORTED}% -\indexlibraryglobal{ECONNREFUSED}% -\indexlibraryglobal{ECONNRESET}% -\indexlibraryglobal{EDEADLK}% -\indexlibraryglobal{EDESTADDRREQ}% -\indexlibraryglobal{EDOM}% -\indexlibraryglobal{EEXIST}% -\indexlibraryglobal{EFAULT}% -\indexlibraryglobal{EFBIG}% -\indexlibraryglobal{EHOSTUNREACH}% -\indexlibraryglobal{EIDRM}% -\indexlibraryglobal{EILSEQ}% -\indexlibraryglobal{EINPROGRESS}% -\indexlibraryglobal{EINTR}% -\indexlibraryglobal{EINVAL}% -\indexlibraryglobal{EIO}% -\indexlibraryglobal{EISCONN}% -\indexlibraryglobal{EISDIR}% -\indexlibraryglobal{ELOOP}% -\indexlibraryglobal{EMFILE}% -\indexlibraryglobal{EMLINK}% -\indexlibraryglobal{EMSGSIZE}% -\indexlibraryglobal{ENAMETOOLONG}% -\indexlibraryglobal{ENETDOWN}% -\indexlibraryglobal{ENETRESET}% -\indexlibraryglobal{ENETUNREACH}% -\indexlibraryglobal{ENFILE}% -\indexlibraryglobal{ENOBUFS}% -\indexlibraryglobal{ENODEV}% -\indexlibraryglobal{ENOENT}% -\indexlibraryglobal{ENOEXEC}% -\indexlibraryglobal{ENOLCK}% -\indexlibraryglobal{ENOLINK}% -\indexlibraryglobal{ENOMEM}% -\indexlibraryglobal{ENOMSG}% -\indexlibraryglobal{ENOPROTOOPT}% -\indexlibraryglobal{ENOSPC}% -\indexlibraryglobal{ENOSYS}% -\indexlibraryglobal{ENOTCONN}% -\indexlibraryglobal{ENOTDIR}% -\indexlibraryglobal{ENOTEMPTY}% -\indexlibraryglobal{ENOTRECOVERABLE}% -\indexlibraryglobal{ENOTSOCK}% -\indexlibraryglobal{ENOTSUP}% -\indexlibraryglobal{ENOTTY}% -\indexlibraryglobal{ENXIO}% -\indexlibraryglobal{EOPNOTSUPP}% -\indexlibraryglobal{EOVERFLOW}% -\indexlibraryglobal{EOWNERDEAD}% -\indexlibraryglobal{EPERM}% -\indexlibraryglobal{EPIPE}% -\indexlibraryglobal{EPROTO}% -\indexlibraryglobal{EPROTONOSUPPORT}% -\indexlibraryglobal{EPROTOTYPE}% -\indexlibraryglobal{ERANGE}% -\indexlibraryglobal{EROFS}% -\indexlibraryglobal{ESPIPE}% -\indexlibraryglobal{ESRCH}% -\indexlibraryglobal{ETIMEDOUT}% -\indexlibraryglobal{ETXTBSY}% -\indexlibraryglobal{EWOULDBLOCK}% -\indexlibraryglobal{EXDEV}% \begin{codeblock} -#define errno @\seebelow@ - -#define E2BIG @\seebelow@ // freestanding -#define EACCES @\seebelow@ // freestanding -#define EADDRINUSE @\seebelow@ // freestanding -#define EADDRNOTAVAIL @\seebelow@ // freestanding -#define EAFNOSUPPORT @\seebelow@ // freestanding -#define EAGAIN @\seebelow@ // freestanding -#define EALREADY @\seebelow@ // freestanding -#define EBADF @\seebelow@ // freestanding -#define EBADMSG @\seebelow@ // freestanding -#define EBUSY @\seebelow@ // freestanding -#define ECANCELED @\seebelow@ // freestanding -#define ECHILD @\seebelow@ // freestanding -#define ECONNABORTED @\seebelow@ // freestanding -#define ECONNREFUSED @\seebelow@ // freestanding -#define ECONNRESET @\seebelow@ // freestanding -#define EDEADLK @\seebelow@ // freestanding -#define EDESTADDRREQ @\seebelow@ // freestanding -#define EDOM @\seebelow@ // freestanding -#define EEXIST @\seebelow@ // freestanding -#define EFAULT @\seebelow@ // freestanding -#define EFBIG @\seebelow@ // freestanding -#define EHOSTUNREACH @\seebelow@ // freestanding -#define EIDRM @\seebelow@ // freestanding -#define EILSEQ @\seebelow@ // freestanding -#define EINPROGRESS @\seebelow@ // freestanding -#define EINTR @\seebelow@ // freestanding -#define EINVAL @\seebelow@ // freestanding -#define EIO @\seebelow@ // freestanding -#define EISCONN @\seebelow@ // freestanding -#define EISDIR @\seebelow@ // freestanding -#define ELOOP @\seebelow@ // freestanding -#define EMFILE @\seebelow@ // freestanding -#define EMLINK @\seebelow@ // freestanding -#define EMSGSIZE @\seebelow@ // freestanding -#define ENAMETOOLONG @\seebelow@ // freestanding -#define ENETDOWN @\seebelow@ // freestanding -#define ENETRESET @\seebelow@ // freestanding -#define ENETUNREACH @\seebelow@ // freestanding -#define ENFILE @\seebelow@ // freestanding -#define ENOBUFS @\seebelow@ // freestanding -#define ENODEV @\seebelow@ // freestanding -#define ENOENT @\seebelow@ // freestanding -#define ENOEXEC @\seebelow@ // freestanding -#define ENOLCK @\seebelow@ // freestanding -#define ENOLINK @\seebelow@ // freestanding -#define ENOMEM @\seebelow@ // freestanding -#define ENOMSG @\seebelow@ // freestanding -#define ENOPROTOOPT @\seebelow@ // freestanding -#define ENOSPC @\seebelow@ // freestanding -#define ENOSYS @\seebelow@ // freestanding -#define ENOTCONN @\seebelow@ // freestanding -#define ENOTDIR @\seebelow@ // freestanding -#define ENOTEMPTY @\seebelow@ // freestanding -#define ENOTRECOVERABLE @\seebelow@ // freestanding -#define ENOTSOCK @\seebelow@ // freestanding -#define ENOTSUP @\seebelow@ // freestanding -#define ENOTTY @\seebelow@ // freestanding -#define ENXIO @\seebelow@ // freestanding -#define EOPNOTSUPP @\seebelow@ // freestanding -#define EOVERFLOW @\seebelow@ // freestanding -#define EOWNERDEAD @\seebelow@ // freestanding -#define EPERM @\seebelow@ // freestanding -#define EPIPE @\seebelow@ // freestanding -#define EPROTO @\seebelow@ // freestanding -#define EPROTONOSUPPORT @\seebelow@ // freestanding -#define EPROTOTYPE @\seebelow@ // freestanding -#define ERANGE @\seebelow@ // freestanding -#define EROFS @\seebelow@ // freestanding -#define ESPIPE @\seebelow@ // freestanding -#define ESRCH @\seebelow@ // freestanding -#define ETIMEDOUT @\seebelow@ // freestanding -#define ETXTBSY @\seebelow@ // freestanding -#define EWOULDBLOCK @\seebelow@ // freestanding -#define EXDEV @\seebelow@ // freestanding +#define @\libmacro{errno}@ @\seebelow@ + +#define @\libmacro{E2BIG}@ @\seebelow@ // freestanding +#define @\libmacro{EACCES}@ @\seebelow@ // freestanding +#define @\libmacro{EADDRINUSE}@ @\seebelow@ // freestanding +#define @\libmacro{EADDRNOTAVAIL}@ @\seebelow@ // freestanding +#define @\libmacro{EAFNOSUPPORT}@ @\seebelow@ // freestanding +#define @\libmacro{EAGAIN}@ @\seebelow@ // freestanding +#define @\libmacro{EALREADY}@ @\seebelow@ // freestanding +#define @\libmacro{EBADF}@ @\seebelow@ // freestanding +#define @\libmacro{EBADMSG}@ @\seebelow@ // freestanding +#define @\libmacro{EBUSY}@ @\seebelow@ // freestanding +#define @\libmacro{ECANCELED}@ @\seebelow@ // freestanding +#define @\libmacro{ECHILD}@ @\seebelow@ // freestanding +#define @\libmacro{ECONNABORTED}@ @\seebelow@ // freestanding +#define @\libmacro{ECONNREFUSED}@ @\seebelow@ // freestanding +#define @\libmacro{ECONNRESET}@ @\seebelow@ // freestanding +#define @\libmacro{EDEADLK}@ @\seebelow@ // freestanding +#define @\libmacro{EDESTADDRREQ}@ @\seebelow@ // freestanding +#define @\libmacro{EDOM}@ @\seebelow@ // freestanding +#define @\libmacro{EEXIST}@ @\seebelow@ // freestanding +#define @\libmacro{EFAULT}@ @\seebelow@ // freestanding +#define @\libmacro{EFBIG}@ @\seebelow@ // freestanding +#define @\libmacro{EHOSTUNREACH}@ @\seebelow@ // freestanding +#define @\libmacro{EIDRM}@ @\seebelow@ // freestanding +#define @\libmacro{EILSEQ}@ @\seebelow@ // freestanding +#define @\libmacro{EINPROGRESS}@ @\seebelow@ // freestanding +#define @\libmacro{EINTR}@ @\seebelow@ // freestanding +#define @\libmacro{EINVAL}@ @\seebelow@ // freestanding +#define @\libmacro{EIO}@ @\seebelow@ // freestanding +#define @\libmacro{EISCONN}@ @\seebelow@ // freestanding +#define @\libmacro{EISDIR}@ @\seebelow@ // freestanding +#define @\libmacro{ELOOP}@ @\seebelow@ // freestanding +#define @\libmacro{EMFILE}@ @\seebelow@ // freestanding +#define @\libmacro{EMLINK}@ @\seebelow@ // freestanding +#define @\libmacro{EMSGSIZE}@ @\seebelow@ // freestanding +#define @\libmacro{ENAMETOOLONG}@ @\seebelow@ // freestanding +#define @\libmacro{ENETDOWN}@ @\seebelow@ // freestanding +#define @\libmacro{ENETRESET}@ @\seebelow@ // freestanding +#define @\libmacro{ENETUNREACH}@ @\seebelow@ // freestanding +#define @\libmacro{ENFILE}@ @\seebelow@ // freestanding +#define @\libmacro{ENOBUFS}@ @\seebelow@ // freestanding +#define @\libmacro{ENODEV}@ @\seebelow@ // freestanding +#define @\libmacro{ENOENT}@ @\seebelow@ // freestanding +#define @\libmacro{ENOEXEC}@ @\seebelow@ // freestanding +#define @\libmacro{ENOLCK}@ @\seebelow@ // freestanding +#define @\libmacro{ENOLINK}@ @\seebelow@ // freestanding +#define @\libmacro{ENOMEM}@ @\seebelow@ // freestanding +#define @\libmacro{ENOMSG}@ @\seebelow@ // freestanding +#define @\libmacro{ENOPROTOOPT}@ @\seebelow@ // freestanding +#define @\libmacro{ENOSPC}@ @\seebelow@ // freestanding +#define @\libmacro{ENOSYS}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTCONN}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTDIR}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTEMPTY}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTRECOVERABLE}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTSOCK}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTSUP}@ @\seebelow@ // freestanding +#define @\libmacro{ENOTTY}@ @\seebelow@ // freestanding +#define @\libmacro{ENXIO}@ @\seebelow@ // freestanding +#define @\libmacro{EOPNOTSUPP}@ @\seebelow@ // freestanding +#define @\libmacro{EOVERFLOW}@ @\seebelow@ // freestanding +#define @\libmacro{EOWNERDEAD}@ @\seebelow@ // freestanding +#define @\libmacro{EPERM}@ @\seebelow@ // freestanding +#define @\libmacro{EPIPE}@ @\seebelow@ // freestanding +#define @\libmacro{EPROTO}@ @\seebelow@ // freestanding +#define @\libmacro{EPROTONOSUPPORT}@ @\seebelow@ // freestanding +#define @\libmacro{EPROTOTYPE}@ @\seebelow@ // freestanding +#define @\libmacro{ERANGE}@ @\seebelow@ // freestanding +#define @\libmacro{EROFS}@ @\seebelow@ // freestanding +#define @\libmacro{ESPIPE}@ @\seebelow@ // freestanding +#define @\libmacro{ESRCH}@ @\seebelow@ // freestanding +#define @\libmacro{ETIMEDOUT}@ @\seebelow@ // freestanding +#define @\libmacro{ETXTBSY}@ @\seebelow@ // freestanding +#define @\libmacro{EWOULDBLOCK}@ @\seebelow@ // freestanding +#define @\libmacro{EXDEV}@ @\seebelow@ // freestanding \end{codeblock} \pnum diff --git a/source/future.tex b/source/future.tex index 5a66416998..867c7d3c93 100644 --- a/source/future.tex +++ b/source/future.tex @@ -221,17 +221,15 @@ \pnum The header \libheaderref{stdalign.h} has the following macros: -\indexlibraryglobal{__alignas_is_defined}% \begin{codeblock} -#define @\xname{alignas_is_defined}@ 1 -#define @\xname{alignof_is_defined}@ 1 +#define @\libxmacro{alignas_is_defined}@ 1 +#define @\libxmacro{alignof_is_defined}@ 1 \end{codeblock} \pnum The header \libheaderref{stdbool.h} has the following macro: -\indexlibraryglobal{__bool_true_false_are_defined}% \begin{codeblock} -#define @\xname{bool_true_false_are_defined}@ 1 +#define @\libxmacro{bool_true_false_are_defined}@ 1 \end{codeblock} \rSec1[depr.cerrno]{Deprecated error numbers} @@ -239,15 +237,11 @@ \pnum The header \libheaderref{cerrno} has the following additional macros: -\indexlibraryglobal{ENODATA}% -\indexlibraryglobal{ENOSR}% -\indexlibraryglobal{ENOSTR}% -\indexlibraryglobal{ETIME}% \begin{codeblock} -#define ENODATA @\seebelow@ -#define ENOSR @\seebelow@ -#define ENOSTR @\seebelow@ -#define ETIME @\seebelow@ +#define @\libmacro{ENODATA}@ @\seebelow@ +#define @\libmacro{ENOSR}@ @\seebelow@ +#define @\libmacro{ENOSTR}@ @\seebelow@ +#define @\libmacro{ETIME}@ @\seebelow@ \end{codeblock} \pnum @@ -861,7 +855,7 @@ template void atomic_init(atomic*, typename atomic::value_type) noexcept; - #define ATOMIC_VAR_INIT(value) @\seebelow@ + #define @\libmacro{ATOMIC_VAR_INIT}@(value) @\seebelow@ } \end{codeblock} @@ -910,7 +904,7 @@ \indexlibraryglobal{ATOMIC_VAR_INIT}% \begin{itemdecl} -#define ATOMIC_VAR_INIT(value) @\seebelow@ +#define @\libmacro{ATOMIC_VAR_INIT}@(value) @\seebelow@ \end{itemdecl} \begin{itemdescr} diff --git a/source/iostreams.tex b/source/iostreams.tex index c44ab8b2a8..ce34883e95 100644 --- a/source/iostreams.tex +++ b/source/iostreams.tex @@ -18825,22 +18825,6 @@ \indexlibraryglobal{size_t}% \indexlibraryglobal{FILE}% \indexlibraryglobal{fpos_t}% -\indexlibraryglobal{NULL}% -\indexlibraryglobal{_IOFBF}% -\indexlibraryglobal{_IOLBF}% -\indexlibraryglobal{_IONBF}% -\indexlibraryglobal{BUFSIZ}% -\indexlibraryglobal{EOF}% -\indexlibraryglobal{FOPEN_MAX}% -\indexlibraryglobal{FILENAME_MAX}% -\indexlibraryglobal{L_tmpnam}% -\indexlibraryglobal{SEEK_CUR}% -\indexlibraryglobal{SEEK_END}% -\indexlibraryglobal{SEEK_SET}% -\indexlibraryglobal{TMP_MAX}% -\indexlibraryglobal{stderr}% -\indexlibraryglobal{stdin}% -\indexlibraryglobal{stdout}% \indexlibraryglobal{remove}% \indexlibraryglobal{rename}% \indexlibraryglobal{tmpfile}% @@ -18893,22 +18877,22 @@ using fpos_t = @\seebelow@; } -#define NULL @\textit{see \ref{support.types.nullptr}}@ -#define _IOFBF @\seebelow@ -#define _IOLBF @\seebelow@ -#define _IONBF @\seebelow@ -#define BUFSIZ @\seebelow@ -#define EOF @\seebelow@ -#define FOPEN_MAX @\seebelow@ -#define FILENAME_MAX @\seebelow@ -#define L_tmpnam @\seebelow@ -#define SEEK_CUR @\seebelow@ -#define SEEK_END @\seebelow@ -#define SEEK_SET @\seebelow@ -#define TMP_MAX @\seebelow@ -#define stderr @\seebelow@ -#define stdin @\seebelow@ -#define stdout @\seebelow@ +#define @\libmacro{NULL}@ @\textit{see \ref{support.types.nullptr}}@ +#define @\libmacro{_IOFBF}@ @\seebelow@ +#define @\libmacro{_IOLBF}@ @\seebelow@ +#define @\libmacro{_IONBF}@ @\seebelow@ +#define @\libmacro{BUFSIZ}@ @\seebelow@ +#define @\libmacro{EOF}@ @\seebelow@ +#define @\libmacro{FOPEN_MAX}@ @\seebelow@ +#define @\libmacro{FILENAME_MAX}@ @\seebelow@ +#define @\libmacro{L_tmpnam}@ @\seebelow@ +#define @\libmacro{SEEK_CUR}@ @\seebelow@ +#define @\libmacro{SEEK_END}@ @\seebelow@ +#define @\libmacro{SEEK_SET}@ @\seebelow@ +#define @\libmacro{TMP_MAX}@ @\seebelow@ +#define @\libmacro{stderr}@ @\seebelow@ +#define @\libmacro{stdin}@ @\seebelow@ +#define @\libmacro{stdout}@ @\seebelow@ namespace std { int remove(const char* filename); @@ -19015,28 +18999,6 @@ \indexlibraryglobal{SCNoFASTN}% \indexlibraryglobal{SCNuFASTN}% \indexlibraryglobal{SCNxFASTN}% -\indexlibraryglobal{PRIdMAX}% -\indexlibraryglobal{PRIiMAX}% -\indexlibraryglobal{PRIoMAX}% -\indexlibraryglobal{PRIuMAX}% -\indexlibraryglobal{PRIxMAX}% -\indexlibraryglobal{PRIXMAX}% -\indexlibraryglobal{SCNdMAX}% -\indexlibraryglobal{SCNiMAX}% -\indexlibraryglobal{SCNoMAX}% -\indexlibraryglobal{SCNuMAX}% -\indexlibraryglobal{SCNxMAX}% -\indexlibraryglobal{PRIdPTR}% -\indexlibraryglobal{PRIiPTR}% -\indexlibraryglobal{PRIoPTR}% -\indexlibraryglobal{PRIuPTR}% -\indexlibraryglobal{PRIxPTR}% -\indexlibraryglobal{PRIXPTR}% -\indexlibraryglobal{SCNdPTR}% -\indexlibraryglobal{SCNiPTR}% -\indexlibraryglobal{SCNoPTR}% -\indexlibraryglobal{SCNuPTR}% -\indexlibraryglobal{SCNxPTR}% \begin{codeblock} #include // see \ref{cstdint.syn} @@ -19087,28 +19049,28 @@ #define SCNoFAST@\placeholdernc{N}@ @\seebelow@ #define SCNuFAST@\placeholdernc{N}@ @\seebelow@ #define SCNxFAST@\placeholdernc{N}@ @\seebelow@ -#define PRIdMAX @\seebelow@ -#define PRIiMAX @\seebelow@ -#define PRIoMAX @\seebelow@ -#define PRIuMAX @\seebelow@ -#define PRIxMAX @\seebelow@ -#define PRIXMAX @\seebelow@ -#define SCNdMAX @\seebelow@ -#define SCNiMAX @\seebelow@ -#define SCNoMAX @\seebelow@ -#define SCNuMAX @\seebelow@ -#define SCNxMAX @\seebelow@ -#define PRIdPTR @\seebelow@ -#define PRIiPTR @\seebelow@ -#define PRIoPTR @\seebelow@ -#define PRIuPTR @\seebelow@ -#define PRIxPTR @\seebelow@ -#define PRIXPTR @\seebelow@ -#define SCNdPTR @\seebelow@ -#define SCNiPTR @\seebelow@ -#define SCNoPTR @\seebelow@ -#define SCNuPTR @\seebelow@ -#define SCNxPTR @\seebelow@ +#define @\libmacro{PRIdMAX}@ @\seebelow@ +#define @\libmacro{PRIiMAX}@ @\seebelow@ +#define @\libmacro{PRIoMAX}@ @\seebelow@ +#define @\libmacro{PRIuMAX}@ @\seebelow@ +#define @\libmacro{PRIxMAX}@ @\seebelow@ +#define @\libmacro{PRIXMAX}@ @\seebelow@ +#define @\libmacro{SCNdMAX}@ @\seebelow@ +#define @\libmacro{SCNiMAX}@ @\seebelow@ +#define @\libmacro{SCNoMAX}@ @\seebelow@ +#define @\libmacro{SCNuMAX}@ @\seebelow@ +#define @\libmacro{SCNxMAX}@ @\seebelow@ +#define @\libmacro{PRIdPTR}@ @\seebelow@ +#define @\libmacro{PRIiPTR}@ @\seebelow@ +#define @\libmacro{PRIoPTR}@ @\seebelow@ +#define @\libmacro{PRIuPTR}@ @\seebelow@ +#define @\libmacro{PRIxPTR}@ @\seebelow@ +#define @\libmacro{PRIXPTR}@ @\seebelow@ +#define @\libmacro{SCNdPTR}@ @\seebelow@ +#define @\libmacro{SCNiPTR}@ @\seebelow@ +#define @\libmacro{SCNoPTR}@ @\seebelow@ +#define @\libmacro{SCNuPTR}@ @\seebelow@ +#define @\libmacro{SCNxPTR}@ @\seebelow@ \end{codeblock} \pnum diff --git a/source/macros.tex b/source/macros.tex index 10e808750c..6c67671220 100644 --- a/source/macros.tex +++ b/source/macros.tex @@ -214,6 +214,11 @@ \newcommand{\libmember}[2]{\indexlibrarymember{#1}{#2}#1} \newcommand{\libspec}[2]{\indexlibrarymemberx{#1}{#2}#1} +% index for macros +% Use in-place defining the macro in header synopses. +\newcommand{\libmacro}[1]{\indexlibraryglobal{#1}\CodeStylex{#1}} +\newcommand{\libxmacro}[1]{\indexlibraryglobal{\idxxname{#1}}\CodeStylex{\xname{#1}}} + % index for library headers \newcommand{\libheaderx}[2]{\indexhdr{#1}\tcode{<#2>}} \newcommand{\libheader}[1]{\libheaderx{#1}{#1}} diff --git a/source/numerics.tex b/source/numerics.tex index 288607d71e..ae00e859cc 100644 --- a/source/numerics.tex +++ b/source/numerics.tex @@ -98,31 +98,20 @@ \indexlibraryglobal{feholdexcept}% \indexlibraryglobal{fesetenv}% \indexlibraryglobal{feupdateenv}% -\indexlibraryglobal{FE_ALL_EXCEPT}% -\indexlibraryglobal{FE_DIVBYZERO}% -\indexlibraryglobal{FE_INEXACT}% -\indexlibraryglobal{FE_INVALID}% -\indexlibraryglobal{FE_OVERFLOW}% -\indexlibraryglobal{FE_UNDERFLOW}% -\indexlibraryglobal{FE_DOWNWARD}% -\indexlibraryglobal{FE_TONEAREST}% -\indexlibraryglobal{FE_TOWARDZERO}% -\indexlibraryglobal{FE_UPWARD}% -\indexlibraryglobal{FE_DFL_ENV}% \begin{codeblock} -#define FE_ALL_EXCEPT @\seebelow@ -#define FE_DIVBYZERO @\seebelow@ // optional -#define FE_INEXACT @\seebelow@ // optional -#define FE_INVALID @\seebelow@ // optional -#define FE_OVERFLOW @\seebelow@ // optional -#define FE_UNDERFLOW @\seebelow@ // optional +#define @\libmacro{FE_ALL_EXCEPT}@ @\seebelow@ +#define @\libmacro{FE_DIVBYZERO}@ @\seebelow@ // optional +#define @\libmacro{FE_INEXACT}@ @\seebelow@ // optional +#define @\libmacro{FE_INVALID}@ @\seebelow@ // optional +#define @\libmacro{FE_OVERFLOW}@ @\seebelow@ // optional +#define @\libmacro{FE_UNDERFLOW}@ @\seebelow@ // optional -#define FE_DOWNWARD @\seebelow@ // optional -#define FE_TONEAREST @\seebelow@ // optional -#define FE_TOWARDZERO @\seebelow@ // optional -#define FE_UPWARD @\seebelow@ // optional +#define @\libmacro{FE_DOWNWARD}@ @\seebelow@ // optional +#define @\libmacro{FE_TONEAREST}@ @\seebelow@ // optional +#define @\libmacro{FE_TOWARDZERO}@ @\seebelow@ // optional +#define @\libmacro{FE_UPWARD}@ @\seebelow@ // optional -#define FE_DFL_ENV @\seebelow@ +#define @\libmacro{FE_DFL_ENV}@ @\seebelow@ namespace std { // types @@ -9128,23 +9117,6 @@ \rSec2[cmath.syn]{Header \tcode{} synopsis} \indexheader{cmath}% -\indexlibraryglobal{FP_FAST_FMA}% -\indexlibraryglobal{FP_FAST_FMAF}% -\indexlibraryglobal{FP_FAST_FMAL}% -\indexlibraryglobal{FP_ILOGB0}% -\indexlibraryglobal{FP_ILOGBNAN}% -\indexlibraryglobal{FP_INFINITE}% -\indexlibraryglobal{FP_NAN}% -\indexlibraryglobal{FP_NORMAL}% -\indexlibraryglobal{FP_SUBNORMAL}% -\indexlibraryglobal{FP_ZERO}% -\indexlibraryglobal{HUGE_VAL}% -\indexlibraryglobal{HUGE_VALF}% -\indexlibraryglobal{HUGE_VALL}% -\indexlibraryglobal{INFINITY}% -\indexlibraryglobal{MATH_ERREXCEPT}% -\indexlibraryglobal{MATH_ERRNO}% -\indexlibraryglobal{NAN}% \indexlibraryglobal{abs}% \indexlibraryglobal{acos}% \indexlibraryglobal{acosf}% @@ -9273,7 +9245,6 @@ \indexlibraryglobal{lround}% \indexlibraryglobal{lroundf}% \indexlibraryglobal{lroundl}% -\indexlibraryglobal{math_errhandling}% \indexlibraryglobal{modf}% \indexlibraryglobal{modff}% \indexlibraryglobal{modfl}% @@ -9338,25 +9309,25 @@ using double_t = @\seebelow@; } -#define HUGE_VAL @\seebelow@ -#define HUGE_VALF @\seebelow@ -#define HUGE_VALL @\seebelow@ -#define INFINITY @\seebelow@ -#define NAN @\seebelow@ -#define FP_INFINITE @\seebelow@ -#define FP_NAN @\seebelow@ -#define FP_NORMAL @\seebelow@ -#define FP_SUBNORMAL @\seebelow@ -#define FP_ZERO @\seebelow@ -#define FP_FAST_FMA @\seebelow@ -#define FP_FAST_FMAF @\seebelow@ -#define FP_FAST_FMAL @\seebelow@ -#define FP_ILOGB0 @\seebelow@ -#define FP_ILOGBNAN @\seebelow@ -#define MATH_ERRNO @\seebelow@ -#define MATH_ERREXCEPT @\seebelow@ - -#define math_errhandling @\seebelow@ +#define @\libmacro{HUGE_VAL}@ @\seebelow@ +#define @\libmacro{HUGE_VALF}@ @\seebelow@ +#define @\libmacro{HUGE_VALL}@ @\seebelow@ +#define @\libmacro{INFINITY}@ @\seebelow@ +#define @\libmacro{NAN}@ @\seebelow@ +#define @\libmacro{FP_INFINITE}@ @\seebelow@ +#define @\libmacro{FP_NAN}@ @\seebelow@ +#define @\libmacro{FP_NORMAL}@ @\seebelow@ +#define @\libmacro{FP_SUBNORMAL}@ @\seebelow@ +#define @\libmacro{FP_ZERO}@ @\seebelow@ +#define @\libmacro{FP_FAST_FMA}@ @\seebelow@ +#define @\libmacro{FP_FAST_FMAF}@ @\seebelow@ +#define @\libmacro{FP_FAST_FMAL}@ @\seebelow@ +#define @\libmacro{FP_ILOGB0}@ @\seebelow@ +#define @\libmacro{FP_ILOGBNAN}@ @\seebelow@ +#define @\libmacro{MATH_ERRNO}@ @\seebelow@ +#define @\libmacro{MATH_ERREXCEPT}@ @\seebelow@ + +#define @\libmacro{math_errhandling}@ @\seebelow@ namespace std { constexpr @\placeholdernc{floating-point-type}@ acos(@\placeholdernc{floating-point-type}@ x); @@ -18954,7 +18925,7 @@ \indexheader{stdckdint.h}% \begin{codeblock} -#define @\libglobal{__STDC_VERSION_STDCKDINT_H__}@ 202311L +#define @\libmacro{__STDC_VERSION_STDCKDINT_H__}@ 202311L template bool ckd_add(type1* result, type2 a, type3 b); diff --git a/source/text.tex b/source/text.tex index 9ece404e19..940d04bb4a 100644 --- a/source/text.tex +++ b/source/text.tex @@ -4903,13 +4903,6 @@ \indexlibraryglobal{lconv}% \indexlibraryglobal{setlocale}% \indexlibraryglobal{localeconv}% -\indexlibraryglobal{NULL}% -\indexlibraryglobal{LC_ALL}% -\indexlibraryglobal{LC_COLLATE}% -\indexlibraryglobal{LC_CTYPE}% -\indexlibraryglobal{LC_MONETARY}% -\indexlibraryglobal{LC_NUMERIC}% -\indexlibraryglobal{LC_TIME}% \begin{codeblock} namespace std { struct lconv; @@ -4918,13 +4911,13 @@ lconv* localeconv(); } -#define NULL @\textit{see \ref{support.types.nullptr}}@ -#define LC_ALL @\seebelow@ -#define LC_COLLATE @\seebelow@ -#define LC_CTYPE @\seebelow@ -#define LC_MONETARY @\seebelow@ -#define LC_NUMERIC @\seebelow@ -#define LC_TIME @\seebelow@ +#define @\libmacro{NULL}@ @\textit{see \ref{support.types.nullptr}}@ +#define @\libmacro{LC_ALL}@ @\seebelow@ +#define @\libmacro{LC_COLLATE}@ @\seebelow@ +#define @\libmacro{LC_CTYPE}@ @\seebelow@ +#define @\libmacro{LC_MONETARY}@ @\seebelow@ +#define @\libmacro{LC_NUMERIC}@ @\seebelow@ +#define @\libmacro{LC_TIME}@ @\seebelow@ \end{codeblock} \pnum @@ -13065,7 +13058,6 @@ \indexlibraryglobal{towupper}% \indexlibraryglobal{towctrans}% \indexlibraryglobal{wctrans}% -\indexlibraryglobal{WEOF}% \begin{codeblock} namespace std { using wint_t = @\seebelow@; @@ -13092,7 +13084,7 @@ wctrans_t wctrans(const char* property); } -#define WEOF @\seebelow@ +#define @\libmacro{WEOF}@ @\seebelow@ \end{codeblock} \pnum @@ -13104,10 +13096,6 @@ \rSec2[cwchar.syn]{Header \tcode{} synopsis} \indexheader{cwchar}% -\indexlibraryglobal{NULL}% -\indexlibraryglobal{WCHAR_MAX}% -\indexlibraryglobal{WCHAR_MIN}% -\indexlibraryglobal{WEOF}% \indexlibraryglobal{btowc}% \indexlibraryglobal{fgetwc}% \indexlibraryglobal{fgetws}% @@ -13247,10 +13235,10 @@ size_t wcsrtombs(char* dst, const wchar_t** src, size_t len, mbstate_t* ps); } -#define NULL @\textit{see \ref{support.types.nullptr}}@ // freestanding -#define WCHAR_MAX @\seebelow@ // freestanding -#define WCHAR_MIN @\seebelow@ // freestanding -#define WEOF @\seebelow@ // freestanding +#define @\libmacro{NULL}@ @\textit{see \ref{support.types.nullptr}}@ // freestanding +#define @\libmacro{WCHAR_MAX}@ @\seebelow@ // freestanding +#define @\libmacro{WCHAR_MIN}@ @\seebelow@ // freestanding +#define @\libmacro{WEOF}@ @\seebelow@ // freestanding \end{codeblock} \pnum diff --git a/source/threads.tex b/source/threads.tex index 212367adcd..529ad96370 100644 --- a/source/threads.tex +++ b/source/threads.tex @@ -2405,17 +2405,17 @@ } // \ref{atomics.lockfree}, lock-free property -#define ATOMIC_BOOL_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_CHAR_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_CHAR8_T_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_CHAR16_T_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_CHAR32_T_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_WCHAR_T_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_SHORT_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_INT_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_LONG_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_LLONG_LOCK_FREE @\unspecnc@ // freestanding -#define ATOMIC_POINTER_LOCK_FREE @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_BOOL_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_CHAR_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_CHAR8_T_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_CHAR16_T_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_CHAR32_T_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_WCHAR_T_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_SHORT_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_INT_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_LONG_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_LLONG_LOCK_FREE}@ @\unspecnc@ // freestanding +#define @\libmacro{ATOMIC_POINTER_LOCK_FREE}@ @\unspecnc@ // freestanding namespace std { // \ref{atomics.ref.generic}, class template \tcode{atomic_ref} @@ -2709,7 +2709,7 @@ constexpr void atomic_flag_notify_one(atomic_flag*) noexcept; // freestanding void atomic_flag_notify_all(volatile atomic_flag*) noexcept; // freestanding constexpr void atomic_flag_notify_all(atomic_flag*) noexcept; // freestanding - #define ATOMIC_FLAG_INIT @\seebelownc@ // freestanding + #define @\libmacro{ATOMIC_FLAG_INIT}@ @\seebelownc@ // freestanding // \ref{atomics.fences}, fences extern "C" constexpr void atomic_thread_fence(memory_order) noexcept; // freestanding @@ -3010,30 +3010,19 @@ \rSec2[atomics.lockfree]{Lock-free property} -\indexlibraryglobal{ATOMIC_BOOL_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_CHAR_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_CHAR8_T_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_CHAR16_T_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_CHAR32_T_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_WCHAR_T_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_SHORT_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_INT_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_LONG_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_LLONG_LOCK_FREE}% -\indexlibraryglobal{ATOMIC_POINTER_LOCK_FREE}% \indeximpldef{values of various \tcode{ATOMIC_..._LOCK_FREE} macros} \begin{codeblock} -#define ATOMIC_BOOL_LOCK_FREE @\unspec@ -#define ATOMIC_CHAR_LOCK_FREE @\unspec@ -#define ATOMIC_CHAR8_T_LOCK_FREE @\unspec@ -#define ATOMIC_CHAR16_T_LOCK_FREE @\unspec@ -#define ATOMIC_CHAR32_T_LOCK_FREE @\unspec@ -#define ATOMIC_WCHAR_T_LOCK_FREE @\unspec@ -#define ATOMIC_SHORT_LOCK_FREE @\unspec@ -#define ATOMIC_INT_LOCK_FREE @\unspec@ -#define ATOMIC_LONG_LOCK_FREE @\unspec@ -#define ATOMIC_LLONG_LOCK_FREE @\unspec@ -#define ATOMIC_POINTER_LOCK_FREE @\unspec@ +#define @\libmacro{ATOMIC_BOOL_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_CHAR_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_CHAR8_T_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_CHAR16_T_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_CHAR32_T_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_WCHAR_T_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_SHORT_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_INT_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_LONG_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_LLONG_LOCK_FREE}@ @\unspec@ +#define @\libmacro{ATOMIC_POINTER_LOCK_FREE}@ @\unspec@ \end{codeblock} \pnum @@ -6326,9 +6315,8 @@ This function is an atomic notifying operation\iref{atomics.wait}. \end{itemdescr} -\indexlibraryglobal{ATOMIC_FLAG_INIT}% \begin{itemdecl} -#define ATOMIC_FLAG_INIT @\seebelow@ +#define @\libmacro{ATOMIC_FLAG_INIT}@ @\seebelow@ \end{itemdecl} \begin{itemdescr} @@ -6429,18 +6417,18 @@ template using @\exposid{std-atomic}@ = std::atomic; // \expos -#define _Atomic(T) @\exposid{std-atomic}@ +#define @\libmacro{_Atomic}@(T) @\exposid{std-atomic}@ -#define ATOMIC_BOOL_LOCK_FREE @\seebelow@ -#define ATOMIC_CHAR_LOCK_FREE @\seebelow@ -#define ATOMIC_CHAR16_T_LOCK_FREE @\seebelow@ -#define ATOMIC_CHAR32_T_LOCK_FREE @\seebelow@ -#define ATOMIC_WCHAR_T_LOCK_FREE @\seebelow@ -#define ATOMIC_SHORT_LOCK_FREE @\seebelow@ -#define ATOMIC_INT_LOCK_FREE @\seebelow@ -#define ATOMIC_LONG_LOCK_FREE @\seebelow@ -#define ATOMIC_LLONG_LOCK_FREE @\seebelow@ -#define ATOMIC_POINTER_LOCK_FREE @\seebelow@ +#define @\libmacro{ATOMIC_BOOL_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_CHAR_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_CHAR16_T_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_CHAR32_T_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_WCHAR_T_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_SHORT_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_INT_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_LONG_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_LLONG_LOCK_FREE}@ @\seebelow@ +#define @\libmacro{ATOMIC_POINTER_LOCK_FREE}@ @\seebelow@ using std::@\libglobal{memory_order}@; // \seebelow using std::@\libglobal{memory_order_relaxed}@; // \seebelow @@ -6524,7 +6512,7 @@ using std::@\libglobal{atomic_flag_test_and_set_explicit}@; // \seebelow using std::@\libglobal{atomic_flag_clear}@; // \seebelow using std::@\libglobal{atomic_flag_clear_explicit}@; // \seebelow -#define ATOMIC_FLAG_INIT @\seebelow@ +#define @\libmacro{ATOMIC_FLAG_INIT}@ @\seebelow@ using std::@\libglobal{atomic_thread_fence}@; // \seebelow using std::@\libglobal{atomic_signal_fence}@; // \seebelow @@ -6534,7 +6522,7 @@ Each \grammarterm{using-declaration} for some name $A$ in the synopsis above makes available the same entity as \tcode{std::$A$} declared in \libheaderrefx{atomic}{atomics.syn}. -Each macro listed above other than \tcode{_Atomic(T)} +Each macro listed above other than \tcode{\libmacro{_Atomic}(T)} is defined as in \libheader{atomic}. It is unspecified whether \libheader{stdatomic.h} makes available any declarations in namespace \tcode{std}. diff --git a/source/time.tex b/source/time.tex index 877288f310..08a4c85e4e 100644 --- a/source/time.tex +++ b/source/time.tex @@ -11606,9 +11606,6 @@ \rSec1[ctime.syn]{Header \tcode{} synopsis} \indexheader{ctime}% -\indexlibraryglobal{CLOCKS_PER_SEC}% -\indexlibraryglobal{NULL}% -\indexlibraryglobal{TIME_UTC}% \indexlibraryglobal{asctime}% \indexlibraryglobal{clock_t}% \indexlibraryglobal{clock}% @@ -11625,9 +11622,9 @@ \indexlibraryglobal{time}% \indexlibraryglobal{tm}% \begin{codeblock} -#define NULL @\textit{see \ref{support.types.nullptr}}@ -#define CLOCKS_PER_SEC @\seebelow@ -#define TIME_UTC @\seebelow@ +#define @\libmacro{NULL}@ @\textit{see \ref{support.types.nullptr}}@ +#define @\libmacro{CLOCKS_PER_SEC}@ @\seebelow@ +#define @\libmacro{TIME_UTC}@ @\seebelow@ namespace std { using size_t = @\textit{see \ref{support.types.layout}}@; diff --git a/source/utilities.tex b/source/utilities.tex index 688d827f86..4420f49fbb 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -15485,11 +15485,11 @@ \indexheader{stdbit.h}% \begin{codeblock} -#define @\libglobal{__STDC_VERSION_STDBIT_H__}@ 202311L +#define @\libmacro{__STDC_VERSION_STDBIT_H__}@ 202311L -#define @\libglobal{__STDC_ENDIAN_BIG__}@ @\seebelow@ -#define @\libglobal{__STDC_ENDIAN_LITTLE__}@ @\seebelow@ -#define @\libglobal{__STDC_ENDIAN_NATIVE__}@ @\seebelow@ +#define @\libmacro{__STDC_ENDIAN_BIG__}@ @\seebelow@ +#define @\libmacro{__STDC_ENDIAN_LITTLE__}@ @\seebelow@ +#define @\libmacro{__STDC_ENDIAN_NATIVE__}@ @\seebelow@ unsigned int @\libglobal{stdc_leading_zeros_uc}@(unsigned char value); unsigned int @\libglobal{stdc_leading_zeros_us}@(unsigned short value);