Errors, bugs, questions - page 1136

 
A100:

That's right, it has to be, otherwise what's the point of specifying

instead of

To work with standard collections, a class must not have const methods, because not every class can do this, but every class can use standard collections. The const constraint is imposed by an external function and it is its right, but it is not allowed to impose constraints on the architecture of third-party objects.
 
TheXpert:
A* B::a = new A;

Constructor A is not static, trying to call it will naturally cause an error:

'A' - non static methods and members cannot be used.
 
C-4:
The const constraint is imposed by the external function and it is its right, but it has no right to impose constraints on the architecture of third-party objects.

Explain then what sense you put by specifying below const - just to be?

void f(const A* a) //почему не void f(A* a)
 
A100:

Explain then what point are you making by specifying below const - just to be?

This is a question to the developers of the standard library, not to me. Unfortunately, if you want to use Compare, you must redefine it according to its signature, i.e. use const. Otherwise standard search, sorting and paste algorithms won't work with my objects. But my objects do not contain const and by virtue of their structure cannot contain const. So the question is, why can't I use standard storage algorithms just because I don't have access to this damn const? !!!!
 
как начать работать в торговом терминале? я понятия просто не имею...
 
C-4:

Constructor A is not static, trying to call it will naturally cause an error:

This is actually a valid initialization. Static in a class has nothing to do with the object which is static.

And the fact that it doesn't compile really looks like a bug.

 

Fleder, thanks for the clarification! Do the authors of the project keep a changelog on MetaEditor and the MQL language?

 
Tron_KZ:

Fleder, thanks for the clarification! Do the authors of the project keep a changelog on MetaEditor and the MQL language?

Check it out here.
 
C-4:
So the question is, why can't I use standard storage algorithms just because I can't access the damn const? !!!!

Announcement

void f(const A* a)
doesn't mean that class A has to have only const methods. It only means that in f() itself only const methods can be called
 
TheXpert:

This is actually the correct initialisation. A statik in a class has nothing to do with an object that is a statik.

And the fact that it doesn't compile really looks like a bug.

I have written to Service Desk, but would like a quicker response from the developers.
Reason: