Skip to content

Conversation

@rpatters1
Copy link
Contributor

LuaBridge fails to compile on Windows Visual Studio 2023 unless NOMINMAX is defined.

The Windows sdk has really stupid macro definitions for min and max. You can suppress them with NOMINMAX, but imo it is incumbent on libraries where possible to accommodate this, since the fix is so easy.

With std::min(max) you simply enclose it in parentheses. That is:

int x = std::min(a, b);

becomes

int x = (std::min)(a, b);

This PR applies similar parentheses to the calls in LuaHelper.h

@kunitoki kunitoki merged commit 89e8c9b into kunitoki:master Apr 3, 2023
rpatters1 added a commit to finale-lua/LuaBridge3 that referenced this pull request Apr 3, 2023
…-no-enable-shared

* dev/fix_class_hashing:
  Fix class hashing
  Update amalgamation file
  Fix invalid noexcept specification (kunitoki#100)
  Rename sonar.yml to sonar.yml_
  Update amalgamation file
  enclose all calls to std::...min/max in parents (kunitoki#98)
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