Download MetaTrader 5

What version of C++ does MQL5 look like? C++ 11?

To add comments, please log in or register
Pierre Rougier
552
Pierre Rougier  

Hello,

What version of C++ does MQL5 look like?

C++ 11?

Regards,

whroeder1
17050
whroeder1  
11? Try something before 98.
/*+------------------------------------------------------------------+
//| Mql4 is like C++ except: no typedefs or namespaces, no pointers  |
//| to POD (so no iterators,) no operator(), operator*, or           |
//| operator-> (latter two are unnecessary as pointers are           |
//| automatically dereferenced when used.) No implicit conversions   |
//| (operator bool), no Koenig lookup, can't return references, no   |
//| exceptions, no class friends, no multiple inheritance. No stand  |
//| alone operatorXX() functions (yet build 950.) Can't use          |
//| template<class X...> must be template <typename x...>. Given a   |
//| f(const T&){} f(123) or f(f2()) doesn't  compile (Build 950,)    |
//| must have a actual variable - this means templates can not       |
//| deduce their data types for temporary variables. Structures must |
//| be passed by reference.                                          |
//|                                                                  |
//| No operator() so instead, I use UnaryPredicate: is_member(),     |
//| BinaryPredicate: is_before(), and is_same(), and various types   |
//| of operators: operate().                                         |
//| Because array access in MT4 is 10x slower than variable access,  |
//| some additional temporaries have been used.                      |
//+------------------------------------------------------------------+
Alain Verleyen
Moderator
35039
Alain Verleyen  
whroeder1:
11? Try something before 98.

In conclusion mql5 is not like c++ 


To add comments, please log in or register