From e70d4dc417320358b6ed7db0a9e2c6065084c1dd Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 1 Dec 2009 00:29:23 +0000 Subject: Getting closer with the pointer formatter... --- src/formatter.h | 5 ++--- 1 file 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 Formatter &operator<<( Formatter &rOut, bool b ); template - Formatter &operator<<( Formatter &rOut, const type *p ) + Formatter &operator<<( Formatter &rOut, type * const &p ) { - rOut << (ptrdiff_t)(p); - return rOut; + return rOut << "0x" << Fmt::hex(sizeof(ptrdiff_t)*2) << (ptrdiff_t)(p); } }; -- cgit v1.2.3