|
|
|
@ -15,7 +15,7 @@ namespace rng::init
|
|
|
|
|
const std::function<Random* (const void*)>& apply_raw(std::string_view name, std::function<Random* (const void*)> fn) noexcept;
|
|
|
|
|
|
|
|
|
|
template<typename T, typename _Ptr = void>
|
|
|
|
|
inline auto apply(std::string_view name, auto&& lam)
|
|
|
|
|
inline auto apply(std::string_view name, auto&& lam) noexcept
|
|
|
|
|
{
|
|
|
|
|
return apply_raw(name, [lam](const void* seed) -> Random* {
|
|
|
|
|
return static_cast<Random*>(lam(reinterpret_cast<const _Ptr*>(seed)));
|
|
|
|
|