Skip to content
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

Max: Change to MaxValue #4113

Closed
wants to merge 1 commit into from
Closed

Max: Change to MaxValue #4113

wants to merge 1 commit into from

Conversation

serkazi
Copy link

@serkazi serkazi commented Jan 3, 2023

Some codebases still feature macroses
such as Max(), which clash with
gtrst-internal.h's Max() function.
This change proposes that we name
it as MaxValue().

@google-cla
Copy link

google-cla bot commented Jan 3, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Some codebases still feature macroses
such as Max(), which clash with
gtrst-internal.h's Max() function.
This change proposes that we name
it as MaxValue().

Signed-off-by: serkazi <se7kazi@gmail.com>
@derekmauro derekmauro self-assigned this Jan 9, 2023
copybara-service bot pushed a commit that referenced this pull request Jan 24, 2023
In #4113 a user says Max clashes with a macro. Since it is only used in
a test, use std::numeric_limits::max() instead.

Note that in headers, the macro issue can be mitigated with
parenthesis like this: `(std::numeric_limits<T>::max)()`

PiperOrigin-RevId: 504284906
Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
@derekmauro
Copy link
Member

I ended up taking a different approach for this problem with 544c96e.

@derekmauro derekmauro closed this Jan 24, 2023
gaspardpetit pushed a commit to eidosmontreal/googletest that referenced this pull request Feb 24, 2023
In google#4113 a user says Max clashes with a macro. Since it is only used in
a test, use std::numeric_limits::max() instead.

Note that in headers, the macro issue can be mitigated with
parenthesis like this: `(std::numeric_limits<T>::max)()`

PiperOrigin-RevId: 504284906
Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
kunitoki pushed a commit to kunitoki/googletest that referenced this pull request Nov 4, 2023
In google#4113 a user says Max clashes with a macro. Since it is only used in
a test, use std::numeric_limits::max() instead.

Note that in headers, the macro issue can be mitigated with
parenthesis like this: `(std::numeric_limits<T>::max)()`

PiperOrigin-RevId: 504284906
Change-Id: Ibf430caec1a6afdf6b303534fec6a4fd00a6373f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants