Skip to content

cairomm/exception.h: Export Cairo::logic_error selectively

Chun-wei Fan requested to merge fanc999/cairomm:master into master

From the commit message:

Since this class derives std::logic_error, don't export the class as a whole but instead export its member methods as necessary on Windows. This will make the compiled DLL to not be locked in a single compiler/STL version, and will remove the compiler warnings C4251, C4273 and C4275 on Visual Studio.

This updates the following:

  • cairomm/exception.h: Export individual methods of Cairo::logic_error instead of the whole class, so that we avoid the issue like 1, and also avoid built code from being tied to a specific Visual Studio and STL version. This will also remove some of the build warnings (C4251,C4273 and C4275, along with C4530 due to our use of /EHsc).

  • Visual Studio build files (NMake/Meson): Clean up due to the previous point. For Meson builds, we now also ignore warnings C4127 and C4800 as they are really spurious warnings that we can ignore. The code now builds under Meson with -Dwarnings=fatal,

With blessings, thank you!

Merge request reports