POV-Ray : Newsgroups : povray.off-topic : Saw a weird C++ construct I'm not sure I understand... : Re: Saw a weird C++ construct I'm not sure I understand... Server Time
10 Oct 2024 03:08:16 EDT (-0400)
  Re: Saw a weird C++ construct I'm not sure I understand...  
From: Darren New
Date: 20 Aug 2008 17:11:41
Message: <48ac888d$1@news.povray.org>
Warp wrote:
>   That's a rather obscure, although clever way of printing error information
> in case of assertion failure.

That was my first impression.

>   The only problem I see with this is that you can't compile this in a
> way that completely drops out the operator<< calls and its parameters.

Huh. I see what you're doing there. That too was my first thought. 
(Indeed, it took me a couple minutes to even figure out how it would 
exit *after* printing stuff if the assertion failed. But then I'm not a 
C++ kind of person.)

I thought it might even have been the point that the operator<< 
parameters get evaluated anyway, as in "don't break the code by turning 
off the debugging", for parameters that might accidentally have a 
side-effect.

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.