diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-12-01 00:29:23 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-12-01 00:29:23 +0000 |
commit | e70d4dc417320358b6ed7db0a9e2c6065084c1dd (patch) | |
tree | 30996d5aad0f8cd4f8c3d84bb3283d394c413b52 | |
parent | 1f894ce98811eb8a2ab893db6c2d53cd77a111e7 (diff) | |
download | libbu++-e70d4dc417320358b6ed7db0a9e2c6065084c1dd.tar.gz libbu++-e70d4dc417320358b6ed7db0a9e2c6065084c1dd.tar.bz2 libbu++-e70d4dc417320358b6ed7db0a9e2c6065084c1dd.tar.xz libbu++-e70d4dc417320358b6ed7db0a9e2c6065084c1dd.zip |
Getting closer with the pointer formatter...
-rw-r--r-- | src/formatter.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/formatter.h b/src/formatter.h index 23c738a..7bf854b 100644 --- a/src/formatter.h +++ b/src/formatter.h | |||
@@ -241,10 +241,9 @@ namespace Bu | |||
241 | Formatter &operator<<( Formatter &rOut, bool b ); | 241 | Formatter &operator<<( Formatter &rOut, bool b ); |
242 | 242 | ||
243 | template<typename type> | 243 | template<typename type> |
244 | Formatter &operator<<( Formatter &rOut, const type *p ) | 244 | Formatter &operator<<( Formatter &rOut, type * const &p ) |
245 | { | 245 | { |
246 | rOut << (ptrdiff_t)(p); | 246 | return rOut << "0x" << Fmt::hex(sizeof(ptrdiff_t)*2) << (ptrdiff_t)(p); |
247 | return rOut; | ||
248 | } | 247 | } |
249 | }; | 248 | }; |
250 | 249 | ||