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

sfm: disable min/max macros under win32 #3083

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

sergiud
Copy link
Contributor

@sergiud sergiud commented Oct 20, 2021

Using Visual Studio 2017, I observe in the sfm module errors such as

opencv_contrib\modules\sfm\src\libmv_light\libmv/correspondence/matches.h(234): error C2589: '(': illegal token on right side of '::'

caused by min/max being defined as macros. This PR adds the NOMINMAX define to the sfm module to avoid the macro definitions.

Pull Request Readiness Checklist

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Copy link
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you 👍

@opencv-pushbot opencv-pushbot merged commit 5cc328d into opencv:3.4 Oct 20, 2021
@sergiud sergiud deleted the win32-sfm-no-minmax-macros branch October 20, 2021 17:12
@alalek alalek mentioned this pull request Oct 23, 2021
@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants