Errors, bugs, questions - page 2679
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
2365 - the code was sprinkled with errors. Had no time to figure it out yet. I rolled back to 2361 - it was ok. In mq4 - same situation.
Thanks for the message, I will check
Seems to be in the parameter passing when calling the constructor of the base class.
Bug MT5 (build 2365) Compilation error on implicit constructor call to class using assignment operator, when pointer passing by reference is used as constructor argument.
If pointer passing by reference is replaced by value passing, everything works.
Thanks for the post, fixed
MT5 bug (build 2365) compilation error when calling base class constructor when template parameter of template class is used as base class.
No problems in MT5 (build 2363).
We can see that ArrayResize for objects is faster now.
Once again, the complexity of one part of the ArrayResize function was reduced from logarithm to zero
Thank you very much for speeding up ArrayResize for reserved memory.
MT5 (build 2365) on a real project std::vector::push_back is 1.5 times faster than previous build.
And std::vector:resize lag has decreased from 2.2 times to 1.45 times.
build 2366, I think the constants are not working correctly now
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 1. 4
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 2. 5
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 3. 6
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 4. 7
if you replace const with static , it will work as expected - one call to f1() and f2() during initialization of a and b
2020.03.21 12:58:03.496 tst (EURUSD,H1) A::f1
2020.03.21 12:58:03.496 tst (EURUSD,H1) A::f2
2020.03.21 12:58:03.496 tst (EURUSD,H1) 1. 4
2020.03.21 12:58:03.496 tst (EURUSD,H1) 2. 5
2020.03.21 12:58:03.496 tst (EURUSD,H1) 3. 6
2020.03.21 12:58:03.496 tst (EURUSD,H1) 4. 7
If you write code like this, it's a total bug that can't be caught
build 2366, I think the constants are not working correctly now
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 1. 4
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 2. 5
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 3. 6
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f1
2020.03.21 12:55:59.904 tst (EURUSD,H1) A::f2
2020.03.21 12:55:59.904 tst (EURUSD,H1) 4. 7
if you replace const with static , it will work as expected - one call to f1() and f2() during initialization of a and b
2020.03.21 12:58:03.496 tst (EURUSD,H1) A::f1
2020.03.21 12:58:03.496 tst (EURUSD,H1) A::f2
2020.03.21 12:58:03.496 tst (EURUSD,H1) 1. 4
2020.03.21 12:58:03.496 tst (EURUSD,H1) 2. 5
2020.03.21 12:58:03.496 tst (EURUSD,H1) 3. 6
2020.03.21 12:58:03.496 tst (EURUSD,H1) 4. 7
This is exactly how it should work.
If you write code like this, it's a total undetectable bug.
Everything is correct here too.
This is exactly how it should work.
Last year it didn't work that way - I specially tested const modifiers
and it seems that@Ilyas explained how to run an MQL-program, first all const and static are initialized, no matter where they are described, and then the class constructors are called
ok, with this initialization static / const - it can still be properly distributed, but the fact that the const modifier does not guarantee that the compiler will check this is very unexpected - my second example