PatWie / CppNumericalSolvers

a lightweight header-only C++17 library of numerical optimization methods for nonlinear functions based on Eigen
MIT License
878 stars 201 forks source link

Interference from windows.h about std::max in problem.h #108

Closed zhongjingjogy closed 6 years ago

zhongjingjogy commented 6 years ago

A similar issue is reported here.

It is suggested that

(std::min)(a, b); // added parentheses around function name
(std::max)(a, b);
PatWie commented 6 years ago

I would prefer std::min<Dtype> then. Does #define NOMINMAX work for you?

PatWie commented 6 years ago

fixed in ec0a32e1ce3d299157e94b82a88a5530c5a93502