[libsigc++2] sigc++config.h.in: Allow Build for MSVC 2013



commit b695f22b121e69f77c9ce23e67368a6f5517f132
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Sep 2 12:56:06 2015 +0800

    sigc++config.h.in: Allow Build for MSVC 2013
    
    MSVC 2013 does not have the C++-11 noexcept, so we need to define that to
    _NOEXCEPT for MSVC 2013.  Plus, since by default MSVC 2013 does not allow
    us to re-define keywords, though they may or may not be supported, we need
    to use the _ALLOW_KEYWORD_MACROS macro to allow this to happen.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754082

 sigc++config.h.in |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/sigc++config.h.in b/sigc++config.h.in
index 087370c..3311216 100644
--- a/sigc++config.h.in
+++ b/sigc++config.h.in
@@ -48,6 +48,11 @@
 # define SIGC_NEW_DELETE_IN_LIBRARY_ONLY 1 /* To keep ABI compatibility */
 # define SIGC_HAVE_NAMESPACE_STD 1
 
+#if (_MSC_VER < 1900) && !defined (noexcept)
+#define _ALLOW_KEYWORD_MACROS 1
+#define noexcept _NOEXCEPT
+#endif
+
 #else /* SIGC_MSC */
 
 /* does the C++ compiler support the use of a particular specialization when


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]