-
Notifications
You must be signed in to change notification settings - Fork 787
[cstdint, cinttypes.syn] Reorganize <cstdint> presentation #843
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1872,42 +1872,41 @@ | |
using uintptr_t = @\textit{unsigned integer type}@; // optional | ||
} | ||
|
||
#define INT@\placeholdernc{N}@_MIN @\seebelow@ | ||
#define INT@\placeholdernc{N}@_MAX @\seebelow@ | ||
#define UINT@\placeholdernc{N}@_MAX @\seebelow@ | ||
#define INT[8, 16, 32, 64]_MIN @\seebelow@ // optional | ||
#define INT[8, 16, 32, 64]_MAX @\seebelow@ // optional | ||
#define UINT[8, 16, 32, 64]_MAX @\seebelow@ // optional | ||
|
||
#define INT_FAST@\placeholdernc{N}@_MIN @\seebelow@ | ||
#define INT_FAST@\placeholdernc{N}@_MAX @\seebelow@ | ||
#define UINT_FAST@\placeholdernc{N}@_MAX @\seebelow@ | ||
#define INT_LEAST[8, 16, 32, 64]_MIN @\seebelow@ | ||
#define INT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ | ||
#define UINT_LEAST[8, 16, 32, 64]_MAX @\seebelow@ | ||
|
||
#define INT_LEAST@\placeholdernc{N}@_MIN @\seebelow@ | ||
#define INT_LEAST@\placeholdernc{N}@_MAX @\seebelow@ | ||
#define UINT_LEAST@\placeholdernc{N}@_MAX @\seebelow@ | ||
#define INT_FAST[8, 16, 32, 64]_MIN @\seebelow@ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems worse: the never-defined pattern-matching language of "INT_[FAST LEAST]{8 16 32 64}_MIN" is both changed and used in what would otherwise be a preprocessor directive (rather than prose). |
||
#define INT_FAST[8, 16, 32, 64]_MAX @\seebelow@ | ||
#define UINT_FAST[8, 16, 32, 64]_MAX @\seebelow@ | ||
|
||
#define INTMAX_MIN @\seebelow@ | ||
#define INTMAX_MAX @\seebelow@ | ||
#define UINTMAX_MAX @\seebelow@ | ||
#define INTPTR_MIN @\seebelow@ // optional | ||
#define INTPTR_MAX @\seebelow@ // optional | ||
#define UINTPTR_MAX @\seebelow@ // optional | ||
|
||
#define INTPTR_MIN @\seebelow@ // optional | ||
#define INTPTR_MAX @\seebelow@ // optional | ||
#define UINTPTR_MAX @\seebelow@ // optional | ||
#define INTMAX_MIN @\seebelow@ | ||
#define INTMAX_MAX @\seebelow@ | ||
#define UINTMAX_MAX @\seebelow@ | ||
|
||
#define PTRDIFF_MIN @\seebelow@ | ||
#define PTRDIFF_MAX @\seebelow@ | ||
#define SIZE_MAX @\seebelow@ | ||
#define PTRDIFF_MIN @\seebelow@ | ||
#define PTRDIFF_MAX @\seebelow@ | ||
#define SIG_ATOMIC_MIN @\seebelow@ | ||
#define SIG_ATOMIC_MAX @\seebelow@ | ||
#define SIZE_MAX @\seebelow@ | ||
|
||
#define SIG_ATOMIC_MIN @\seebelow@ | ||
#define SIG_ATOMIC_MAX @\seebelow@ | ||
#define WCHAR_MIN @\seebelow@ | ||
#define WCHAR_MAX @\seebelow@ | ||
#define WINT_MIN @\seebelow@ | ||
#define WINT_MAX @\seebelow@ | ||
|
||
#define WCHAR_MIN @\seebelow@ | ||
#define WCHAR_MAX @\seebelow@ | ||
#define INT[8, 16, 32, 64]_C(value) @\seebelow@ // optional | ||
#define UINT[8, 16, 32, 64]_C(value) @\seebelow@ // optional | ||
|
||
#define WINT_MIN @\seebelow@ | ||
#define WINT_MAX @\seebelow@ | ||
|
||
#define INT@\placeholdernc{N}@_C(value) @\seebelow@ | ||
#define UINT@\placeholdernc{N}@_C(value) @\seebelow@ | ||
#define INTMAX_C(value) @\seebelow@ | ||
#define INTMAX_C(value) @\seebelow@ | ||
#define UINTMAX_C(value) @\seebelow@ | ||
\end{codeblock} | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These did not appear to be optional before.
I do not think we can fix this editorially; we need to ask LWG what they meant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These macros are supposed to expand to expressions of their corresponding type. Since the corresponding type is optional, surely the macro must also be optional?
But indeed the LEAST/FAST macros should absolutely not be optional, that's a mistake that I will fix at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will open an LWG issue to have the question settled of whether the macros are optional.