From b8f2e345df8436b5c2b1f581d10794ba6c8926a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 16 Oct 2013 22:42:14 +0200 Subject: [PATCH] Removed forward declaration of std::hash. Aside from the fact that we shouldn't have done it at all, it caused at least two roblems: 1. std::hash is by standard defined as struct, but GCC's libstdc++ defined it as class, causing Clang warning (probably harmless, but annoying). 2. Clang's libcxx implements STL in inline namespace std::__1, which causes the forward declaration to define a completely new struct, different to std::__1::hash. The actual template specialization std::hash would then be totally unrelated to std::__1::hash, causing compiler error. Removing the forward declaration solves this, as it's possible to do the specialization without knowing about the inline namespace. --- src/Magnum.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Magnum.h b/src/Magnum.h index cf8ec73e1..e9473f17e 100644 --- a/src/Magnum.h +++ b/src/Magnum.h @@ -412,11 +412,4 @@ class Timeline; } -namespace std { - #ifndef DOXYGEN_GENERATING_OUTPUT - template struct hash; - #endif - template<> struct hash; -} - #endif