C++ guys hate static_if?

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Mar 11 18:32:44 PDT 2013


On Mon, Mar 11, 2013 at 09:03:20PM -0400, Nick Sabalausky wrote:
> On Mon, 11 Mar 2013 20:53:59 -0400
> "Jonathan M Davis" <jmdavisProg at gmx.com> wrote:
> 
> > On Monday, March 11, 2013 23:12:45 monarch_dodra wrote:
> > > What *are* you talking about??? I can count 4 declarations in 2
> > > static ifs? What is your definition of "declaration" and "scope".
> > > 
> > > There's a misunderstanding somewhere here. Can YOU show us an
> > > example where there is a declaration that is scoped?
> > 
> > Exactly. Every single line in those static ifs is a variable
> > declaration, and not a one of them creates a new scope, or the code
> > wouldn't compile. I don't understand how Timon can think that there
> > are no declarations in that code. There's clearly a fundamental
> > misunderstanding and/or miscommunication here.
> > 
> 
> Timon was talking about declarations in the static if's *condition*,
> not the body.

Regardless, I have shown that even declarations in the condition leaks
past the body of the static if.


T

-- 
Don't modify spaghetti code unless you can eat the consequences.


More information about the Digitalmars-d mailing list