summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-01-14 16:05:08 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-01-20 17:37:22 +0800
commit16fabd982d85dc84c68217816aef357ccd931c4e (patch)
tree9735fd6131d20bd150cfcfd87c432c877d3b996d /examples
parent531980716af3a8d6284801e13a2e807d082eee3d (diff)
downloadglibmm-16fabd982d85dc84c68217816aef357ccd931c4e.tar.gz
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
Diffstat (limited to 'examples')
-rw-r--r--examples/thread/thread.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/thread/thread.cc b/examples/thread/thread.cc
index 816e7c73..f535254d 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>