diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-05-11 11:17:56 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-05-11 11:17:56 +0800 |
commit | 1cd341f8350ed1c54c5089957bf43f8e12c59b9f (patch) | |
tree | a17716bdc6d636791bb9f2775b07b8035699d842 | |
parent | c47657158a0bfddf526e24191c233567ff0b2708 (diff) |
cairomm/exception.h: Export Cairo::logic_error selectively
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.
-rw-r--r-- | cairomm/exception.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cairomm/exception.h b/cairomm/exception.h index b60c190..bffabed 100644 --- a/cairomm/exception.h +++ b/cairomm/exception.h @@ -34,14 +34,14 @@ namespace Cairo /** */ -class CAIROMM_API logic_error: public std::logic_error +class logic_error: public std::logic_error { public: - explicit logic_error(ErrorStatus status); - ~logic_error() noexcept override; + CAIROMM_API explicit logic_error(ErrorStatus status); + CAIROMM_API ~logic_error() noexcept override; //virtual const char* what() const noexcept; - ErrorStatus get_status_code() const; + CAIROMM_API ErrorStatus get_status_code() const; private: ErrorStatus m_status; |