From 271781f78c544d66706c49060118d4a520cd49d1 Mon Sep 17 00:00:00 2001 From: Nicolas Wack Date: Sun, 19 Jan 2014 19:30:42 +0100 Subject: [PATCH] Fix compilation with clang/libc++ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue was that redeclaring the hash template in the code somehow seems to shadow the declaration that is done in and and afterwards the template specialization of the hash function seems to use our redefined template instead of libc++’s one (most likely due to the fact that libc++ uses an inline namespace inside std) --- include/fc/array.hpp | 2 -- include/fc/crypto/ripemd160.hpp | 2 -- include/fc/crypto/sha1.hpp | 2 -- include/fc/crypto/sha224.hpp | 2 -- include/fc/network/ip.hpp | 2 -- include/fc/uint128.hpp | 2 -- 6 files changed, 12 deletions(-) diff --git a/include/fc/array.hpp b/include/fc/array.hpp index cae423f..b465b59 100644 --- a/include/fc/array.hpp +++ b/include/fc/array.hpp @@ -117,8 +117,6 @@ namespace fc { #include namespace std { - template struct hash; - template struct hash > { diff --git a/include/fc/crypto/ripemd160.hpp b/include/fc/crypto/ripemd160.hpp index 9816fe4..5cf404d 100644 --- a/include/fc/crypto/ripemd160.hpp +++ b/include/fc/crypto/ripemd160.hpp @@ -79,8 +79,6 @@ class ripemd160 namespace std { - template struct hash; - template<> struct hash { diff --git a/include/fc/crypto/sha1.hpp b/include/fc/crypto/sha1.hpp index 991ae57..62d077c 100644 --- a/include/fc/crypto/sha1.hpp +++ b/include/fc/crypto/sha1.hpp @@ -72,8 +72,6 @@ class sha1 namespace std { - template struct hash; - template<> struct hash { diff --git a/include/fc/crypto/sha224.hpp b/include/fc/crypto/sha224.hpp index 26fd51b..a7ed1ae 100644 --- a/include/fc/crypto/sha224.hpp +++ b/include/fc/crypto/sha224.hpp @@ -73,8 +73,6 @@ class sha224 } // fc namespace std { - template struct hash; - template<> struct hash { diff --git a/include/fc/network/ip.hpp b/include/fc/network/ip.hpp index 900c89a..60b95d7 100644 --- a/include/fc/network/ip.hpp +++ b/include/fc/network/ip.hpp @@ -112,8 +112,6 @@ namespace fc { } namespace std { - template struct hash; - template<> struct hash { diff --git a/include/fc/uint128.hpp b/include/fc/uint128.hpp index 2d84c4f..d41b388 100644 --- a/include/fc/uint128.hpp +++ b/include/fc/uint128.hpp @@ -99,8 +99,6 @@ namespace fc namespace std { - template struct hash; - template<> struct hash {