summaryrefslogtreecommitdiff
path: root/libs/pbd/pthread_utils.cc
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2013-07-16 18:00:49 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2013-07-16 18:00:49 +0100
commit7b480eaa27d73e2e5c21c6ac785a1aa2fb3aa51a (patch)
tree997d0988cda21ea79ee9675f31b6b79e99335d46 /libs/pbd/pthread_utils.cc
parente4ab2ffbfbe12cea63e1046b37184ddf32d9ba47 (diff)
Windows (compiler specific) includes for libpbd
Diffstat (limited to 'libs/pbd/pthread_utils.cc')
-rw-r--r--libs/pbd/pthread_utils.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc
index 96cf99716f..91d93ec4f8 100644
--- a/libs/pbd/pthread_utils.cc
+++ b/libs/pbd/pthread_utils.cc
@@ -28,6 +28,14 @@
#include <fst.h>
#endif
+#ifdef COMPILER_MSVC
+DECLARE_DEFAULT_COMPARISONS(pthread_t) // Needed for 'DECLARE_DEFAULT_COMPARISONS'. Objects in an STL container can be
+ // searched and sorted. Thus, when instantiating the container, MSVC complains
+ // if the type of object being contained has no appropriate comparison operators
+ // defined (specifically, if operators '<' and '==' are undefined). This seems
+ // to be the case with ptw32 'pthread_t' which is a simple struct.
+#endif
+
using namespace std;
typedef std::list<pthread_t> ThreadMap;