ampl / mp

An open-source library for mathematical programming
https://mp.ampl.com
Other
229 stars 42 forks source link

make namespace explicit when accessing fmt from fmt::internal #175

Closed svigerske closed 2 years ago

svigerske commented 2 years ago

When compiling with MSVC and /permissive-, we had problems in format.cc. Members of the anonymous namespace inside fmt were not found when trying to use them from fmt::internal. With the changes from this PR, we avoid this problem.

svigerske commented 2 years ago

As a side note, there are other issues that prevent compilation with /permissive-. Apparently Microsofts own header files are not ready for this so far: https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#windows-header-issues

Adding a

struct IUnknown;

before any

#include <windows.h>

works around these. As this is not a problem with ampl::mp, I didn't include this here.

glebbelov commented 2 years ago

Merged. The workaround for can be added if necessary.