#pragma once #include "mersenne64.h" #include "mersenne32.h" #include "common_ops.h" namespace NPrivate { template struct TMersenneTraits; template <> struct TMersenneTraits { using TImpl = TMersenne64; }; template <> struct TMersenneTraits { using TImpl = TMersenne32; }; } // namespace NPrivate class IInputStream; template class TMersenne: public TCommonRNG>, public ::NPrivate::TMersenneTraits::TImpl { public: using TBase = typename ::NPrivate::TMersenneTraits::TImpl; inline TMersenne() noexcept { } inline TMersenne(T seed) noexcept : TBase(seed) { } inline TMersenne(IInputStream& pool) : TBase(pool) { } inline TMersenne(const T* keys, size_t len) noexcept : TBase(keys, len) { } };