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:33:47 +0800 |
commit | adb6abea434e4f8d6236f15d2a6c807063efd1ed (patch) | |
tree | 2c46f609d8131562cf9f9cc816b3f56173dfc350 | |
parent | 646a6dad2ff5f8b56f44e787b1a8385fe9c1735a (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.
Also remove the workaround for Visual Studio 2013 since Visual Studio 2017 or
later is required for cairomm master.
-rw-r--r-- | cairomm/exception.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cairomm/exception.h b/cairomm/exception.h index b60c190..6af99b8 100644 --- a/cairomm/exception.h +++ b/cairomm/exception.h @@ -24,24 +24,19 @@ #include <cairomm/enums.h> #include <stdexcept> -#if defined(_MSC_VER) && (_MSC_VER < 1900) -#define _ALLOW_KEYWORD_MACROS 1 -#define noexcept _NOEXCEPT -#endif - 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; |