MobinMQL/Include/Generic/Internal/DefaultComparer.mqh

23 lines
1.2 KiB
MQL5
Raw Permalink Normal View History

2025-07-22 14:47:41 +03:00
//+------------------------------------------------------------------+
//| DefaultComparer.mqh |
//| Copyright 2000-2025, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#include <Generic\Interfaces\IComparer.mqh>
#include "CompareFunction.mqh"
//+------------------------------------------------------------------+
//| Class CDefaultComparer<T>. |
//| Usage: Provides a default class for implementations of the |
//| IComparer<T> generic interface. |
//+------------------------------------------------------------------+
template<typename T>
class CDefaultComparer: public IComparer<T>
{
public:
CDefaultComparer(void) { }
~CDefaultComparer(void) { }
//--- compares two values and returns a value describing relationship between them
int Compare(T x,T y) { return ::Compare(x,y); }
};
//+------------------------------------------------------------------+