Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

avoid clashes with std::min and std:max from STL #15

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

Merged
merged 1 commit into from
Jun 6, 2020

Conversation

arduhe
Copy link

@arduhe arduhe commented Jun 6, 2020

The definitions for min() and max in src/arduino/Arduino.h produce a lot of errors when using STL (for example with googletest) like this:

/usr/include/c++/7/limits:1002:11: error: macro "max" requires 2 arguments, but only 1 given
       max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
           ^
/usr/include/c++/7/limits:1006:38: error: macro "min" requires 2 arguments, but only 1 given
       lowest() noexcept { return min(); }
                                      ^

This minor patch avoids that.

Please accept this PR.

@FabioBatSilva FabioBatSilva merged commit f7f2a51 into FabioBatSilva:master Jun 6, 2020
@FabioBatSilva
Copy link
Owner

Thanks @arduhe

@arduhe
Copy link
Author

arduhe commented Jun 6, 2020

Thanks for your quick reaction. Could you please so kind to publish a new version of your lib?

@arduhe arduhe deleted the clashmin branch June 6, 2020 18:06
@FabioBatSilva
Copy link
Owner

I released 0.2.2.

It might take a while to show up on platformio..
The last time a pushed one took almost 2 days

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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.