veselink1 / refl-cpp

Static reflection for C++17 (compile-time enumeration, attributes, proxies, overloads, template functions, metaprogramming).
https://veselink1.github.io/refl-cpp/md__introduction.html
MIT License
1.05k stars 76 forks source link

Get display name const vs2019 fix #53

Closed rpatters1 closed 2 years ago

rpatters1 commented 2 years ago

This pull request resolves #52.

The issue turned out to be that Visual Studio 2019 (latest version as of this post) does not like the use of std::min where it was being used in refl.hpp. (EDIT) I had replaced it with simple C code but have subsequently realized that the problem is that the Windows include files don't work with std::min/max without the inclusion of #define NOMINMAX. So now the change is just to put std::min in parentheses, which fixes the problem on Windows without the #define and continues to work on other platforms.

veselink1 commented 2 years ago

Thanks, merged in https://github.com/veselink1/refl-cpp/commit/14c37248b7fabec0766bc8c574cd1bf3e00e326b.