diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-09-10 15:47:10 +0800 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2015-09-10 10:27:06 +0200 |
commit | 89af305c415076b4b4bf579c3b243581045f3a71 (patch) | |
tree | eb746a9e3133cd6420177b0671c0652870329275 | |
parent | f3bf7977fed587038eb145dd8b9f0fdcef85f4c2 (diff) |
cairomm/exception.h: Allow Build on Visual Studio 2013
Visual Studio 2013 has one catch for its C++-11 support: It does
not support noexcept, but has its own _NOEXCEPT for the same purpose.
Add a define for it, while defining the _ALLOW_KEYWORD_MACROS as newer
Visual Studio Versions do not allow one to define known keywords, even if
it is not supported, by default.
-rw-r--r-- | cairomm/exception.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cairomm/exception.h b/cairomm/exception.h index 27f1f67..766eea9 100644 --- a/cairomm/exception.h +++ b/cairomm/exception.h @@ -22,6 +22,11 @@ #include <cairomm/enums.h> #include <stdexcept> +#if defined(_MSC_VER) && (_MSC_VER < 1900) +#define _ALLOW_KEYWORD_MACROS 1 +#define noexcept _NOEXCEPT +#endif + namespace Cairo { |