merge changes

This commit is contained in:
Daniel Larimer 2014-02-06 02:49:02 -05:00
commit 23eead5eaa
9 changed files with 7 additions and 56 deletions

View file

@ -117,8 +117,6 @@ namespace fc {
#include <fc/crypto/city.hpp>
namespace std
{
template<typename T> struct hash;
template<typename T, size_t N>
struct hash<fc::array<T,N> >
{

View file

@ -79,8 +79,6 @@ class ripemd160
namespace std
{
template<typename T> struct hash;
template<>
struct hash<fc::ripemd160>
{

View file

@ -72,8 +72,6 @@ class sha1
namespace std
{
template<typename T> struct hash;
template<>
struct hash<fc::sha1>
{

View file

@ -73,8 +73,6 @@ class sha224
} // fc
namespace std
{
template<typename T> struct hash;
template<>
struct hash<fc::sha224>
{

View file

@ -23,8 +23,8 @@ namespace fc
enum_type& operator=( IntType i ) { value = (EnumType)i; return *this;}
enum_type& operator=( EnumType i ) { value = i; return *this;}
bool operator<( EnumType i ) { return value < i; }
bool operator>( EnumType i ) { return value < i; }
bool operator<( EnumType i ) const { return value < i; }
bool operator>( EnumType i ) const { return value < i; }
bool operator<(const enum_type& e) const { return value < e.value;}
bool operator>(const enum_type& e) const { return value > e.value;}

View file

@ -1,37 +0,0 @@
#pragma once
#include <fc/string.hpp>
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;
};
}
}

View file

@ -112,8 +112,6 @@ namespace fc {
}
namespace std
{
template<typename T> struct hash;
template<>
struct hash<fc::ip::endpoint>
{

View file

@ -36,7 +36,7 @@ namespace fc {
explicit time_point( microseconds e = microseconds() ) :elapsed(e){}
static time_point now();
static time_point maximum() { return time_point( microseconds::maximum() ); }
static time_point (min)() { return time_point(); }
static time_point min() { return time_point(); }
operator fc::string()const;
static time_point from_iso_string( const fc::string& s );
@ -48,10 +48,10 @@ namespace fc {
bool operator <=( const time_point& t )const { return elapsed._count <=t.elapsed._count; }
bool operator ==( const time_point& t )const { return elapsed._count ==t.elapsed._count; }
bool operator !=( const time_point& t )const { return elapsed._count !=t.elapsed._count; }
time_point& operator += ( const microseconds& m ) { elapsed+=m; return *this; }
friend time_point operator + ( const time_point& t, const microseconds& m ) { return time_point(t.elapsed+m); }
friend time_point operator - ( const time_point& t, const microseconds& m ) { return time_point(t.elapsed-m); }
friend microseconds operator - ( const time_point& t, const time_point& m ) { return microseconds(t.elapsed.count() - m.elapsed.count()); }
time_point& operator += ( const microseconds& m) { elapsed+=m; return *this; }
time_point operator + (const microseconds& m) const { return time_point(elapsed+m); }
time_point operator - (const microseconds& m) const { return time_point(elapsed-m); }
microseconds operator - (const time_point& m) const { return microseconds(elapsed.count() - m.elapsed.count()); }
private:
microseconds elapsed;
};

View file

@ -104,8 +104,6 @@ namespace fc
namespace std
{
template<typename T> struct hash;
template<>
struct hash<fc::uint128>
{