mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2024-11-10 20:15:08 +01:00
15 lines
547 B
C++
15 lines
547 B
C++
#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)...));
|
|
}
|
|
|
|
bool ReadFromPhysicalAddress(uint32_t srcPhys, uint32_t *out);
|