Fix compilation of devel/google-sparsehash with clang 3.6.0

PR:		198091
Submitted by:	 Dimitry Andric
This commit is contained in:
Vasil Dimov 2015-03-04 08:43:45 +00:00
parent be14269756
commit 22832b2f3b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=380423

View file

@ -0,0 +1,11 @@
--- src/hashtable_test.cc.orig 2012-02-22 21:49:42.000000000 +0100
+++ src/hashtable_test.cc 2015-02-28 13:31:07.532995000 +0100
@@ -898,7 +898,7 @@
// Now swap back, using the free-function swap
// NOTE: MSVC seems to have trouble with this free swap, not quite
// sure why. I've given up trying to fix it though.
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || (defined(__clang__) && __clang_major__ >= 3 && __clang_minor__ >= 6)
other_ht.swap(this->ht_);
#else
swap(this->ht_, other_ht);