From 09c84c173128f78ccd71813013c3d6c97aaeeee7 Mon Sep 17 00:00:00 2001 From: Daniel Larimer Date: Thu, 6 Feb 2014 03:22:09 -0500 Subject: [PATCH] fixes to build under clang++ --- include/fc/array.hpp | 1 + include/fc/crypto/sha224.hpp | 1 + include/fc/network/ip.hpp | 6 +++++- include/fc/utility.hpp | 8 ++++---- src/network/ip.cpp | 8 -------- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/include/fc/array.hpp b/include/fc/array.hpp index b465b59..ce86ee0 100644 --- a/include/fc/array.hpp +++ b/include/fc/array.hpp @@ -114,6 +114,7 @@ namespace fc { } +#include #include namespace std { diff --git a/include/fc/crypto/sha224.hpp b/include/fc/crypto/sha224.hpp index a7ed1ae..a0da04d 100644 --- a/include/fc/crypto/sha224.hpp +++ b/include/fc/crypto/sha224.hpp @@ -1,4 +1,5 @@ #pragma once +#include #include #include diff --git a/include/fc/network/ip.hpp b/include/fc/network/ip.hpp index 60b95d7..5d59c1b 100644 --- a/include/fc/network/ip.hpp +++ b/include/fc/network/ip.hpp @@ -2,6 +2,7 @@ #include #include #include +#include namespace fc { @@ -115,6 +116,9 @@ namespace std template<> struct hash { - size_t operator()( const fc::ip::endpoint& e )const; + size_t operator()( const fc::ip::endpoint& e )const + { + return fc::city_hash64( (char*)&e, sizeof(e) ); + } }; } diff --git a/include/fc/utility.hpp b/include/fc/utility.hpp index 098d9d0..0096ac5 100644 --- a/include/fc/utility.hpp +++ b/include/fc/utility.hpp @@ -10,10 +10,10 @@ #endif -namespace std { - typedef decltype(sizeof(int)) size_t; - typedef decltype(nullptr) nullptr_t; -} +//namespace std { +// typedef decltype(sizeof(int)) size_t; +// typedef decltype(nullptr) nullptr_t; +//} namespace fc { using std::size_t; diff --git a/src/network/ip.cpp b/src/network/ip.cpp index 81da0df..abc3c5f 100644 --- a/src/network/ip.cpp +++ b/src/network/ip.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -132,10 +131,3 @@ namespace fc { namespace ip { } } -namespace std -{ - size_t hash::operator()( const fc::ip::endpoint& e )const - { - return fc::city_hash64( (char*)&e, sizeof(e) ); - } -}