Compile Error when use template in Class inheritance
template<typename T>
class Foo{};
template<typename T>
class Bar:public Foo< T >{};
voidOnStart()
{
Bar<int> b;
Bar<Foo<int>> b2;
Bar<const Foo<int>* > b3;
Foo<constvoid *> f; // this is ok
Bar< constvoid* > b4; // but this is not ok// here is the problem: when set the tmplate type in Bar to "const void *", some compile error// 'T' - unexpected token// '<' - wrong template parameters count
}
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.
Is it a bug?
Compile Error when use template in Class inheritance
Hi,
I have downloaded beta-release 2323;
When I start compiling my EA, I'm receiving errors, that did not existed before.
Probably a bug in the compiler; when I switch back to a previous release (of the editor), it's OK again.
Regards,
Danny
there seems to be a computation error as shown in attachment.
Where would this error originate please?
I am using 2280 version 5
Thank you
Hi,
I've downloaded and testen beta build 2326.
I've still seen a problem with the editor giving a compilation error.
When I switch back to build 2280, it's ok again.
Regards,
Danny