fixes to build under clang++

This commit is contained in:
Daniel Larimer 2014-02-06 03:22:09 -05:00
parent 23eead5eaa
commit 09c84c1731
5 changed files with 11 additions and 13 deletions

View file

@ -114,6 +114,7 @@ namespace fc {
}
#include <unordered_map>
#include <fc/crypto/city.hpp>
namespace std
{

View file

@ -1,4 +1,5 @@
#pragma once
#include <unordered_map>
#include <fc/fwd.hpp>
#include <fc/string.hpp>

View file

@ -2,6 +2,7 @@
#include <fc/string.hpp>
#include <fc/crypto/sha1.hpp>
#include <fc/io/raw_fwd.hpp>
#include <fc/crypto/city.hpp>
namespace fc {
@ -115,6 +116,9 @@ namespace std
template<>
struct hash<fc::ip::endpoint>
{
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) );
}
};
}

View file

@ -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;

View file

@ -1,5 +1,4 @@
#include <fc/network/ip.hpp>
#include <fc/crypto/city.hpp>
#include <fc/variant.hpp>
#include <boost/asio.hpp>
#include <boost/lexical_cast.hpp>
@ -132,10 +131,3 @@ namespace fc { namespace ip {
}
}
namespace std
{
size_t hash<fc::ip::endpoint>::operator()( const fc::ip::endpoint& e )const
{
return fc::city_hash64( (char*)&e, sizeof(e) );
}
}