summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2013-10-08 09:49:40 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-09 13:52:58 +0200
commit89f9bc9c5f873d6763e35d2f92d31c28f8fb5262 (patch)
tree35f9065239095f09ad96e5fed58be6c6965c5f28
parentdee55b026b539e0c07686aabed3a68ba54ed53f2 (diff)
Fix compilation for MSVC 2008 and std::tuple
For MSVC 2008 make_tuple is in the tr1 namespace. Change-Id: I4a51f6cabdf068993869b404b12ed1484a21a9d4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
-rw-r--r--src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp6
-rw-r--r--src/angle/patches/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch32
2 files changed, 37 insertions, 1 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp
index 610a5efb9c..95a6961e7b 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp
@@ -81,7 +81,11 @@ IndexRangeCache::IndexRange::IndexRange(GLenum typ, intptr_t off, GLsizei c)
bool IndexRangeCache::IndexRange::operator<(const IndexRange& rhs) const
{
- return std::make_tuple(type, offset, count) < std::make_tuple(rhs.type, rhs.offset, rhs.count);
+#if defined(_MSC_VER) && _MSC_VER < 1600
+ return std::tr1::make_tuple(type, offset, count) < std::tr1::make_tuple(rhs.type, rhs.offset, rhs.count);
+#else
+ return std::make_tuple(type, offset, count) < std::tr1::make_tuple(rhs.type, rhs.offset, rhs.count);
+#endif
}
IndexRangeCache::IndexBounds::IndexBounds()
diff --git a/src/angle/patches/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch b/src/angle/patches/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch
new file mode 100644
index 0000000000..0e72c57be6
--- /dev/null
+++ b/src/angle/patches/0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch
@@ -0,0 +1,32 @@
+From d4776adddb971642164de54141e015abde881740 Mon Sep 17 00:00:00 2001
+From: Thomas Hartmann <Thomas.Hartmann@digia.com>
+Date: Tue, 8 Oct 2013 09:46:54 +0200
+Subject: [PATCH] Fix compilation for MSVC 2008 and std::tuple
+
+For MSVC 2008 make_tuple is in the tr1 namespace.
+
+Change-Id: I4a51f6cabdf068993869b404b12ed1484a21a9d4
+---
+ .../src/libGLESv2/renderer/IndexRangeCache.cpp | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp
+index 610a5ef..95a6961 100644
+--- a/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp
++++ b/src/3rdparty/angle/src/libGLESv2/renderer/IndexRangeCache.cpp
+@@ -81,7 +81,11 @@ IndexRangeCache::IndexRange::IndexRange(GLenum typ, intptr_t off, GLsizei c)
+
+ bool IndexRangeCache::IndexRange::operator<(const IndexRange& rhs) const
+ {
+- return std::make_tuple(type, offset, count) < std::make_tuple(rhs.type, rhs.offset, rhs.count);
++#if defined(_MSC_VER) && _MSC_VER < 1600
++ return std::tr1::make_tuple(type, offset, count) < std::tr1::make_tuple(rhs.type, rhs.offset, rhs.count);
++#else
++ return std::make_tuple(type, offset, count) < std::tr1::make_tuple(rhs.type, rhs.offset, rhs.count);
++#endif
+ }
+
+ IndexRangeCache::IndexBounds::IndexBounds()
+--
+1.7.6.msysgit.0
+