TSNStd/Src/Misce/ReinterpretNative.mqh
Nique_372 Nique_372 06fa80815b
2026-11-05 13:08:17 -05:00
41 lines
1.4 KiB
MQL5
//+------------------------------------------------------------------+
//| ReinterpretNative.mqh |
//| Copyright 2026, Niquel Mendoza. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2026, Niquel Mendoza."
#property link "https://www.mql5.com"
#property strict
#ifndef TSNSTD_SRC_MISCE_REINTERPRETENATIVE_MQH
#define TSNSTD_SRC_MISCE_REINTERPRETENATIVE_MQH
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
namespace TSN
{
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
class CBitsReinterprete
{
public:
CBitsReinterprete(void) {}
~CBitsReinterprete(void) {}
//---
template <typename TOut, typename TIn>
static TOut ToBasic(TIn val)
{
union ___v___
{
TIn i;
TOut o;
} v;
v.i = val;
return v.o;
}
};
}
//+------------------------------------------------------------------+
#endif // TSNSTD_SRC_MISCE_REINTERPRETENATIVE_MQH