aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hash.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/hash.h b/src/hash.h
index 50a35b8..f183a4c 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -1149,6 +1149,24 @@ namespace Bu
1149 template<> uint32_t __calcHashCode<std::string>( const std::string &k ); 1149 template<> uint32_t __calcHashCode<std::string>( const std::string &k );
1150 template<> bool __cmpHashKeys<std::string>( const std::string &a, const std::string &b ); 1150 template<> bool __cmpHashKeys<std::string>( const std::string &a, const std::string &b );
1151 1151
1152 class Formatter;
1153 Formatter &operator<<( Formatter &rOut, char *sStr );
1154 Formatter &operator<<( Formatter &rOut, signed char c );
1155 template<typename key, typename value>
1156 Formatter &operator<<( Formatter &f, const Bu::Hash<key, value> &l )
1157 {
1158 f << '{';
1159 for( typename Bu::Hash<key,value>::const_iterator i = l.begin(); i; i++ )
1160 {
1161 if( i != l.begin() )
1162 f << ", ";
1163 f << i.getKey() << ": " << i.getValue();
1164 }
1165 f << '}';
1166
1167 return f;
1168 }
1169
1152 /* 1170 /*
1153 template<typename key, typename value> 1171 template<typename key, typename value>
1154 Archive &operator<<( Archive &ar, Hash<key,value> &h ) 1172 Archive &operator<<( Archive &ar, Hash<key,value> &h )