Skip to content

Fix for compilers that use C++17 by default. #865

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

Conversation

acolwell
Copy link
Collaborator

@acolwell acolwell commented Feb 17, 2023

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:

PR Description

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
    • I have updated the documentation accordingly

What does this pull request do?

Specifying the MathUtils namespace to resolve the ambiguity caused by the addition of std::clamp() in C++17.

This fixes a build error on Windows with a freshly installed MSYS2 where g++ uses c++17 by default.

Have you tested your changes (if applicable)? If so, how?

Yes. The code that uses MathUtils::clamp() properly builds after this change.

Specifying the MathUtils namespace to resolve the ambiguity
caused by the addition of std::clamp() in C++17.

This fixes a build error on Windows with a freshly installed MSYS2
where g++ uses c++17 by default.
@acolwell acolwell changed the title Fix for complilers that use C++17 by default. Fix for compilers that use C++17 by default. Feb 22, 2023
Copy link
Member

@devernay devernay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devernay devernay merged commit 709c8f1 into NatronGitHub:RB-2.5 Feb 22, 2023
@acolwell acolwell deleted the Fix_MathUtils_for_C++17_compilers branch February 23, 2023 01:42
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