Errors, bugs, questions - page 2325
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Were there any serious reasons to abandon the operator ->?
No, there were no serious reasons.
The only justification for its absence is concern for immature minds of users not familiar with C++.
Is the double negation optimised by the compiler?
Yes, it does.
No, there were no serious reasons.
The only justification for its absence is to care for the fragile minds of users not familiar with C++.
I don't think anything bad will happen if you add it.
You may allow using a point with pointers where there's no ambiguity for some time.
And of course issue a warning.
I don't think anything bad will happen if you add it.
Fora while , you may be allowed to use a point with pointers where there is no ambiguity.
And of course issue a warning.
Why make it so complicated? It's enough to make . and -> equivalent, interchangeable records.
Figuratively speaking
#define -> .
Yes, there is ambiguity in your case. In a good way, there should be at least a compiler warning for this kind of thing.
In my case, which is much simpler, everything is clear. I think C++ agrees with that too.
You have imaginary clarity - a small change (of class A) and the meaning changes dramatically
This is a change to the class and should result in a corresponding compiler message.
If it's not there, it's a total clarity.
As a temporary solution, use the '!' operator. (logical not).
We will think on the solution (can we change the behaviour now, when there is a lot of code ?)
It is possible that for a pointer, a bool conversion operation would be an operation on the pointer and not on the object it points to.
Without changing the existing codes, it won't work... The whole concept of pointers as dynamic objects collapses
I mean, instead of just writing
we'll have to write a confusing one.
if ( *a * *b );//(2)
And all this for what? So that a pointer could be checked for NULL? - There is a comparison operator for that:
Why duplicate it?
the whole concept of pointers as dynamic objects collapses