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/io/enum_type.hpp b/include/fc/io/enum_type.hpp index c4bb024..2127ac2 100644 --- a/include/fc/io/enum_type.hpp +++ b/include/fc/io/enum_type.hpp @@ -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;} 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; - }; - } -} 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/time.hpp b/include/fc/time.hpp index 4f2ce25..98e76dc 100644 --- a/include/fc/time.hpp +++ b/include/fc/time.hpp @@ -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; }; diff --git a/include/fc/uint128.hpp b/include/fc/uint128.hpp index aab14f2..5375b4d 100644 --- a/include/fc/uint128.hpp +++ b/include/fc/uint128.hpp @@ -104,8 +104,6 @@ namespace fc namespace std { - template struct hash; - template<> struct hash {