1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 20:06:40 +00:00

libstrat: fix more gnu++23 errors

This commit is contained in:
Michael Scire 2024-06-05 11:28:29 -07:00
parent c41a6b80d7
commit 5b135d12ca
3 changed files with 3 additions and 3 deletions

View file

@ -42,7 +42,7 @@ namespace ams::sf {
} else if constexpr(TransferMode == BufferTransferMode::AutoSelect) { } else if constexpr(TransferMode == BufferTransferMode::AutoSelect) {
return SfBufferAttr_HipcAutoSelect; return SfBufferAttr_HipcAutoSelect;
} else { } else {
static_assert(TransferMode != TransferMode, "Invalid BufferTransferMode"); static_assert(false, "Invalid BufferTransferMode");
} }
}(); }();

View file

@ -29,7 +29,7 @@ namespace ams::sf {
private: private:
struct Holder { struct Holder {
MemoryResource *allocator; MemoryResource *allocator;
typename std::aligned_storage<sizeof(T), alignof(T)>::type storage; alignas(alignof(T)) std::byte storage[sizeof(T)];
}; };
public: public:
void *Allocate(size_t size) { void *Allocate(size_t size) {

View file

@ -57,7 +57,7 @@ namespace ams::sf {
struct Globals { struct Globals {
ExpHeapAllocator allocator; ExpHeapAllocator allocator;
typename std::aligned_storage<Size == 0 ? 1 : Size>::type buffer; alignas(0x10) std::byte buffer[Size == 0 ? 1 : Size];
}; };
static constinit inline Globals _globals = {}; static constinit inline Globals _globals = {};