I would like to repeat this, so as not to get lost in randomness)
1. Please advise if I open chart ChartOpen(), then how can I return focus (activity, visibility) on my chart, from which my EA works, without closing it.
MT5 bug (build 2342) compilation error when calling a template function with explicit argument types, when called from an overloaded non-template function.
template<typename T>
class B{
public:
void func(const T value){
printf("1\r\n");
func<T>(value); //'func<int>' - ambiguous call to overloaded function with the same parameters
};
template<typename TT>
void func(const TT){
printf("2\r\n");
};
};
voidOnStart(){
B<int> b;
b.func(1);
b.func(1.1);
}
Bug MT5 (build 2342) generates a compilation error when generating code for a template function even though there is an overloaded template function with a suitable signature for the parameters passed. C++ online:https://onlinegdb.com/HyxjmV-DVI
#ifdef __cplusplus
#include <iostream>
#endif
class C{
public:
struct A{
char aaa;
};
template<typename T>
void test(A&, T&, T&, void* = NULL){
printf("1");
}
template<typename T>
void test(T&, T&, T&){
printf("2");
}
};
struct B : public C::A{
char data;
};
struct D{
char data;
};
voidOnStart(){
C c;
B b;
D d;
c.test(b, b, b); // should be: 2
c.test(b, d, d); // should be: 1 //Compile Error: template parameter ambiguous, could be 'B' or 'D'
}
int main(){
OnStart();
return0;
}
Bug MT5 (build 2342) generates a compilation error when generating code for a template function even though there is an overloaded template function with a suitable signature for the parameters passed. C++ online: https://onlinegdb.com/HyxjmV-DVI
Have you ever heard back from Metaquotes about all the hard test work you do?
There is no way to solve the following problem: How to get "partial specialisation" for test function to distinguish transferred parameters and execute different algorithm in each case? I will be glad to help, thank you.
Sergey Dzyublik: There is no way to solve the following problem: How to get "partial specialisation" for test function to distinguish transferred parameters and execute different algorithm in each case? I will be glad to help, thank you.
class C{
public:
struct A{
char aaa;
};
/*void test(A&, A&, A&){
printf("1");
}*/template<typename T>
void test(A&, T&, T&){
if (sizeof(T)==sizeof(A)) printf("1");
elseprintf("2");
}
};
struct B : public C::A{
char data;
};
struct D{
char data;
};
voidOnStart(){
C c;
B b;
D d;
c.test(b, b, b); // 2 should be: 2
c.test(b, d, d); // 1 should be: 1
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
need an ID - local agent in the tester, not sure why there is no such functionality
I would like to repeat this, so as not to get lost in randomness)
1. Please advise if I open chart ChartOpen(), then how can I return focus (activity, visibility) on my chart, from which my EA works, without closing it.
2. Who knows why Bid, Ask does not coincide with chart price Close[0]https://www.mql5.com/ru/forum/160683/page1082#comment_15152111
Yeah, I was looking for that, I didn't think it was the place to look
That's how you get an agent's number.
MT5 bug (build 2342) compilation error when calling a template function with explicit argument types, when called from an overloaded non-template function.
Bug MT5 (build 2342) generates a compilation error when generating code for a template function even though there is an overloaded template function with a suitable signature for the parameters passed.
C++ online:https://onlinegdb.com/HyxjmV-DVI
Bug MT5 (build 2342) generates a compilation error when generating code for a template function even though there is an overloaded template function with a suitable signature for the parameters passed.
C++ online: https://onlinegdb.com/HyxjmV-DVI
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
Sergey Dzyublik, 2020.02.28 22:21
Have you ever heard back from Metaquotes about all the hard test work you do?
Yes and no.
No complaints on my part, but a good word never hurts.
How to get "partial specialisation" for test function to distinguish transferred parameters and execute different algorithm in each case?
I will be glad to help, thank you.
C++ online with expected behaviour(https://onlinegdb.com/rycNVNDN8).
There is no way to solve the following problem:
How to get "partial specialisation" for test function to distinguish transferred parameters and execute different algorithm in each case?
I will be glad to help, thank you.