Errors, bugs, questions - page 2418
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
Passing a parameter by reference implies that there is a variable allocated in memory.
Constants, on the other hand, are not stored anywhere, but are used directly.
And what prevents you from creating a temporary variable?
That's what I do. I don't understand why the developers should do it for me.
That's what I do. Why the developers should do it for me - I don't understand.
That's what I do. Why the developers should do it for me - I don't understand.
How nice that the creators of other languages are less categorical about it
Nothing categorical. I just wouldn't want to waste resources on solving this kind of crap, which is already insufficient to close even bugs in a timely manner. Not to mention new functionality. From announcements to beta releases has become a very long time. And it's even longer before the beta releases are licked. And not without annoying help from forum users.
That's why such topics are perceived as getting to the bottom of bullshit. When so many more serious things aren't done.
That's why topics like this are perceived as getting to the bottom of bullshit. When so many more serious things are not done.
Everyone has their own priorities.
Passing a parameter by reference implies that some value will be put into the corresponding variable in order to use that value later, after the function has been called.
How can a temporary variable be used if it is not the result of an expression?
Passing a parameter by reference implies that some value will be put into the corresponding variable in order to use that value later, after the function has been called.
How can a temporary variable be used if it is not the result of an expression?
Well, it's all subtleties. The pluses have done it, after all. For prvalue, temporary materialization occurs. By the way, you can't do that either
This is most likely the point at which another character is added (why not all 5 since the start of the test?):
Ask for data for all tools in OnInit, it will be loaded immediately.
Passing a parameter by reference implies that some value will be put into the corresponding variable in order to use that value later, after the function is called.
How to use a temporary variable, if it is not the result of expression?
What do you think of adding the ability to pass an argument as an r-value to the language? This would immediately solve all the issues and allow you to create universal containers for any type. In particular, the above method would be overloaded for r-value:
This is exactly how it is implemented in all STL containers.
And the second plus: it will allow to specify move constructors. Now this is also very lacking, in particular for implementation of smart pointers unique_ptr and other classes, designed to monopoly store some unique resource inside themselves, i.e. usual copy constructors are unacceptable for them.