2022-05-08 18:51:05 +02:00
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
template<class T, class... Args>
|
|
|
|
std::unique_ptr<T> make_unique_nothrow(Args &&...args) noexcept(noexcept(T(std::forward<Args>(args)...))) {
|
|
|
|
return std::unique_ptr<T>(new (std::nothrow) T(std::forward<Args>(args)...));
|
|
|
|
}
|
|
|
|
|
|
|
|
template<class T, class... Args>
|
|
|
|
std::shared_ptr<T> make_shared_nothrow(Args &&...args) noexcept(noexcept(T(std::forward<Args>(args)...))) {
|
|
|
|
return std::shared_ptr<T>(new (std::nothrow) T(std::forward<Args>(args)...));
|
|
|
|
}
|
2023-01-02 14:47:19 +01:00
|
|
|
|
|
|
|
bool ReadFromPhysicalAddress(uint32_t srcPhys, uint32_t *out);
|