Errors, bugs, questions - page 1619

 
Slawa:

The system function Point() is actually inlined and converted into a simple access to the _Point variable

Someone said, as I recall, Renat or you, that it's recommended to use Point(), Digits()... Is this true? At least, I always do so, keeping in mind the recommendation.
 
Andrey Dik:
Someone said, as I recall, Renat or you, that it is recommended to use Point(), Digits()... Is this true? At least, remembering the recommendation, I always do so.

Yes, that's right.

Next time I'll give examples which are in line with our recommendations

 

A few questions and requests to the developers.

A year ago we discussed the idea of returning the function value by reference (request 1292558). Finally we were assured that the issue was solved and the feature will appear in the end of autumn (last year). But we are still here. May we ask why it hasn't been implemented?

2. What about multiple inheritance? I, for instance, really need it. At least double inheritance.

3. override keyword for virtual functions in derived classes is an absolutely necessary thing for OOP. The compiler will not be able to control them otherwise: if you set a wrong type of argument somewhere or forgot to use const somewhere, that's it - this is a different function. We also get errors that are hard to catch.

4. we need the possibility to overload the ghost operator.

 

You also need to refine the function templates. Right now, all of your typenames are hardwired to function arguments. Because of this, many constructions cannot be implemented. E.g. this one:

template<typename T> 
T  func()  { return T(0); }

void OnStart()
{
  func<int>();
}

Of course, this can be solved by passing dummy arguments into the function, but you understand that it confuses the code very much.

 
Alexey Navoykov:

You also need to refine the function templates. Right now, all of your typenames are hardwired to function arguments. Because of this, many constructions cannot be implemented. E.g. this one:

Of course, this can be solved in a crutch way, by passing dummy arguments into the function, but you understand that it confuses the code very much.

It is in our plans and we will do it.
 

I would also like the compiler to specify in the log the type of the variable that caused the error when it detects an error inside the template. Otherwise it can be very hard to find it.

Let's assume the following code fragment:

void F(A& a)  {  }
void F(B& a)  {  }


template<typename T> 
void    Func(T& obj)  { F(obj); }   // 'F' - no one of the overloads can be applied to the function call

We do not know what type T corresponds to here, so it's hard to determine where in the program this pattern was called from. And there can be very many such fragments, including those from other templates. And if the compiler had written that obj is of the C type for instance, you would have understood right away where to look.

 
Bild 985 not known bug

Open, Started: 2016.07.04 06:48, #1507434

Coming up on a month ....

 
Vladimir Pastushak:
Bild 985 not known bug

Open, Started: 2016.07.04 06:48, #1507434

Coming up on a month ....

Admins and developers don't go away for a weekend without a response...

 
Hello all. I asked this question several pages ago, but I will try again. Is there any way to re-login my account when MT5 server connection is interrupted? Search on forums did not give anything.
 
Dmitri Custurov:
Hello all. I asked this question several pages ago, but I will try again. Is there any way to re-login my account when MT5 server connection is interrupted? Search on forums did not give anything.
No you can't. But re-connect is automatic, so there is no need.