[glibmm] Threads example: Fix build on Visual Studio



commit 16fabd982d85dc84c68217816aef357ccd931c4e
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jan 14 16:05:08 2016 +0800

    Threads example: Fix build on Visual Studio
    
    We need to include <memory> for unique_* on Visual Studio, and for Visual
    Studio 2013 builds, we need to ensure that glibmmconfig.h is included so
    that noexcept is supported.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760612

 examples/thread/thread.cc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/examples/thread/thread.cc b/examples/thread/thread.cc
index 816e7c7..f535254 100644
--- a/examples/thread/thread.cc
+++ b/examples/thread/thread.cc
@@ -4,6 +4,11 @@
 #include <mutex>
 #include <condition_variable>
 #include <queue>
+#include <memory>
+#if defined (_MSC_VER) && (_MSC_VER < 1900)
+/* For using noexcept on Visual Studio 2013 */
+#include <glibmmconfig.h>
+#endif
 #include <glibmm/random.h>
 #include <glibmm/timer.h>
 #include <glibmm/init.h>


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