From 271781f78c544d66706c49060118d4a520cd49d1 Mon Sep 17 00:00:00 2001 From: Nicolas Wack Date: Sun, 19 Jan 2014 19:30:42 +0100 Subject: [PATCH 1/2] 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 { From 36de4226d9e63e47b8eb811e412dac15afba6002 Mon Sep 17 00:00:00 2001 From: Nicolas Wack Date: Sun, 19 Jan 2014 19:58:58 +0100 Subject: [PATCH 2/2] Removed unused duplicate file. This functionality is now found in network/ip.hpp --- include/fc/network/endpoint.hpp | 37 --------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 include/fc/network/endpoint.hpp diff --git a/include/fc/network/endpoint.hpp b/include/fc/network/endpoint.hpp deleted file mode 100644 index f1805f3..0000000 --- a/include/fc/network/endpoint.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once -#include - -namespace fc { - - namespace ip { - class address { - public: - address( uint32_t _ip = 0 ); - address( const fc::string& s ); - - - address& operator=( const fc::string& s ); - operator fc::string()const; - - uint32_t ip()const { return _ip; } - - - private: - uint32_t _ip; - }; - - class endpoint { - public: - endpoint(); - endpoint( const fc::string& i, uint16_t p ); - endpoint( const address& i, uint16_t p ); - - uint16_t port()const { return _port; } - fc::ip::address get_address()const { return _ip; } - - private: - uint16_t _port; - address _ip; - }; - } -}