Clarification on the usefulness of the "!!" idiom

Pages: 12
> 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 !!
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.
@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
Yes, sorry. Assigment should be first one. Originally I had paretheses around each expression, but removed it before posting.
@ 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