Re: c++ operator << support for debug()()

From: Robert Collins <robertc@dont-contact.us>
Date: 08 Jul 2003 00:10:06 +1000

On Mon, 2003-07-07 at 23:39, Alan Barrett wrote:
> On Mon, 07 Jul 2003, Robert Collins wrote:
> > Interestingly though, my testcases (in test-suite/debug.cc in the
> > branch) use a trailing semicolon quite happily.
>
> The extra trailing semicolon is seen by the compiler as a null
> statement. It's usually harmless, but can cause trouble sometimes. Try
> this:
>
> if (something)
> debugs(x,y)("foo");
> else
> debugs(x,y)("bar");

Ah yes. I've already added the while loop you suggested. A tarball is
available at http://www.squid-cache.org/~robertc/cplusplusdebug.tar.bz2
if you are interested.

I'll add a test case for the if construct tomorrow.. just to be sure.

Rob

-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Received on Mon Jul 07 2003 - 08:10:20 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:15 MST