Added noexcept to global dtor & ctor

Fortune for rngxx's current commit: Half blessing − 半吉
iter
Avril 3 years ago
parent 4b988ba83b
commit 1cf5ca05b2

@ -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)));

@ -29,7 +29,7 @@ namespace rng::init
namespace {
__attribute__((destructor))
static void _rng_ctor__fini() {
static void _rng_ctor__fini() noexcept{
if(LIKELY(INIT_MAP)) {
delete INIT_MAP;
INIT_MAP = nullptr;

Loading…
Cancel
Save