Created attachment 153611 [details]
Use swap member function instead of free swap function, to appease clang 3.6.0
During the exp-run in bug 197395, it was found that devel/google-sparsehash gives errors with clang 3.6.0:
The error is because clang 3.6.0 has become more strict about matching non-type template parameters. However, I am not completely sure if the construction google-sparsehash is using is legal or not, and whether clang is correct to refuse it. It looks like different versions of gcc have different opinions on the legality of non-type template parameter deduction.
I will submit a bug report upstream with clang to figure that out, but in the mean time, I want to propose using the attached patch, which makes hashtable_test.cc use the swap member functions, instead of the free swap functions.
Auto-assigned to maintainer vd@FreeBSD.org
A commit references this bug:
Date: Wed Mar 4 08:43:46 UTC 2015
New revision: 380423
Fix compilation of devel/google-sparsehash with clang 3.6.0
Submitted by: Dimitry Andric
Notice that I limited the effect of the patch to only clang >= 3.6.0.