[Bf-blender-cvs] [f8696742bb2] master: Fix/workaround compilation error on devtoolset-6

Sergey Sharybin noreply at git.blender.org
Fri Jun 12 15:17:20 CEST 2020


Commit: f8696742bb2a727886ab3c492eb0a8c7afba53bb
Author: Sergey Sharybin
Date:   Fri Jun 12 15:15:09 2020 +0200
Branches: master
https://developer.blender.org/rBf8696742bb2a727886ab3c492eb0a8c7afba53bb

Fix/workaround compilation error on devtoolset-6

Smells like GCC bug [1], which is backed up by the fact that locally
GCC-10 and CLang-10 works fine.

Since the change is trivial (and, arguably, correct since there is
no real difference between tests code and actual code) seems fine to
fix.

Fix suggested by Jacques Lucke, thanks!

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480

===================================================================

M	tests/gtests/blenlib/BLI_set_test.cc

===================================================================

diff --git a/tests/gtests/blenlib/BLI_set_test.cc b/tests/gtests/blenlib/BLI_set_test.cc
index 8e77a446a97..2387242c94b 100644
--- a/tests/gtests/blenlib/BLI_set_test.cc
+++ b/tests/gtests/blenlib/BLI_set_test.cc
@@ -9,7 +9,7 @@
 #include "BLI_vector.hh"
 #include "testing/testing.h"
 
-using namespace blender;
+namespace blender {
 
 TEST(set, DefaultConstructor)
 {
@@ -290,7 +290,7 @@ bool operator==(const Type2 &a, const Type1 &b)
   return a.value == b.value;
 }
 
-template<> struct blender::DefaultHash<Type1> {
+template<> struct DefaultHash<Type1> {
   uint32_t operator()(const Type1 &value) const
   {
     return value.value;
@@ -511,3 +511,5 @@ TEST(set, Benchmark)
  */
 
 #endif /* Benchmark */
+
+}  // namespace blender



More information about the Bf-blender-cvs mailing list