It compiles without problems, but crashes on execution with an error. How to write a Copy-function now?
If dll is not critical, then memcpy. Or you may wait for the union.
Well, actually it is fun. The developers themselves called cast structures a standard alternative to unions and now they cannot cast them and haven't done it yet.
In general, of course it's fun. Casting structures was called a standard alternative to union by the developers themselves, now you can't cast and associations aren't yet, right?
So with the advent of union it will be impossible to cast. Only simple cases will be possible.
template <typename T>
T Func()
{
T Res;
return(Res);
}
template <typename T>
void Func( T& Value )
{
T Res = (MqlTick)Value;
}
voidOnStart()
{
Func<string>(); // без этой строки компилируетсяMqlTick Tick;
Func(Tick);
}
The compiler is trying to create a
void Func( string& );
Why doesn't this code compile in 1589? There is no casting here.
If the dll is not critical, then memcpy. Or wait for union
In general, of course, it's funny. Casting structures was called by developers as a standard alternative to union, now it's impossible to cast and no unions yet, right?
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.
And it shouldn't be possible.
Compiles without problems, but crashes on execution with an error. How to write the Copy-function now?
DLLs that used to work don't work anymore. DLL's are 64 bit. Same dlls x32 on MT4 - work.
Windows 10 Home (x64 based PC), 1703, MT5 bild 1589I tried to wriggle out of it
It compiles without problems, but crashes on execution with an error. How to write a Copy-function now?
If dll is not critical, then memcpy. Or you may wait for the union.
Well, actually it is fun. The developers themselves called cast structures a standard alternative to unions and now they cannot cast them and haven't done it yet.
In general, of course it's fun. Casting structures was called a standard alternative to union by the developers themselves, now you can't cast and associations aren't yet, right?
How to write Copy-function now?
How completely perverse to use files, but natively
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
fxsaber, 2017.04.10 16:23
Creating unnecessary overloads which lead to compilation errorsThe compiler is trying to create a
If the dll is not critical, then memcpy. Or wait for union
In general, of course, it's funny. Casting structures was called by developers as a standard alternative to union, now it's impossible to cast and no unions yet, right?
just like that.