Errors, bugs, questions - page 1706

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
Oops, I'm slowing down, the second example isn't right at all.
That's why it is logical that
error: invalid initialization of non-const reference of type 'int*&' from an rvalue of type 'int*'
All three of us had to be so dumb, eh! ))
So why does the first piece of fxsaber example work then?
Why shouldn't he? He has an expression this[0] that returns a pointer. Here is the same thing in a different form:
this[0] is rvalue here.
Result The problem is some nonsense. Unfortunately, the vocabulary is scarce to explain it.
fxsaber:
Точно не так
Результат
The problem is a certain pointlessness
Unfortunately, the vocabulary is scarce for explanation.OK, I don't feel like thinking. Tired already.
The problem is that the pointer (descriptor) from rvalue somehow turns into lvalue after being assigned to a variable. That's a bit crazy...
The expression
will be true. Which makes perfect sense.
The developers should formulate the reason why it is impossible clearly and nicely
Yeah, I messed up.
In short, it's all good :)