Clarification on the usefulness of the "!!" idiom

Pages: 12
May 30, 2013 at 3:07pm
> btw, I never see "!!" used anywhere,
> maybe I am just too inexperienced

You are distinctly better off in this regard than the experienced people who use !!
May 30, 2013 at 3:12pm
Also I would like C++ to drop support of some C features by default (which still could be enabled by compiler switch)
For example: if(x==y || x == z || y = z)
Without implicit int->bool conversion logic error would not happened here.
May 30, 2013 at 3:54pm
@MiiNiPaa
For example: if(x==y || x == z || y = z)
Without implicit int->bool conversion logic error would not happened here.


I think that you are mistaken. The compiler will issue an error for this expression in the if statement because you may not assign a value to prvalue. The assignment operator has the lowest priority in this expression.:)
Last edited on May 30, 2013 at 5:59pm
May 30, 2013 at 4:23pm
Yes, sorry. Assigment should be first one. Originally I had paretheses around each expression, but removed it before posting.
May 31, 2013 at 7:25am
@ helios
I try to read and understand your posts (not always successfully) to enhance my knowledge but seriously I used to drive to work because I thought that someone would steel my lettuce from my handlebar rack if I rode.
Topic archived. No new replies allowed.
Pages: 12