diff --git a/libraries/libstratosphere/include/stratosphere/sf/sf_buffers.hpp b/libraries/libstratosphere/include/stratosphere/sf/sf_buffers.hpp index 32286f48f..bc134fd91 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/sf_buffers.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/sf_buffers.hpp @@ -42,7 +42,7 @@ namespace ams::sf { } else if constexpr(TransferMode == BufferTransferMode::AutoSelect) { return SfBufferAttr_HipcAutoSelect; } else { - static_assert(TransferMode != TransferMode, "Invalid BufferTransferMode"); + static_assert(false, "Invalid BufferTransferMode"); } }(); diff --git a/libraries/libstratosphere/include/stratosphere/sf/sf_default_allocation_policy.hpp b/libraries/libstratosphere/include/stratosphere/sf/sf_default_allocation_policy.hpp index 64a491eb0..56ca7f5a7 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/sf_default_allocation_policy.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/sf_default_allocation_policy.hpp @@ -29,7 +29,7 @@ namespace ams::sf { private: struct Holder { MemoryResource *allocator; - typename std::aligned_storage::type storage; + alignas(alignof(T)) std::byte storage[sizeof(T)]; }; public: void *Allocate(size_t size) { diff --git a/libraries/libstratosphere/include/stratosphere/sf/sf_exp_heap_allocator.hpp b/libraries/libstratosphere/include/stratosphere/sf/sf_exp_heap_allocator.hpp index 5a30b09ee..6ec6fcdca 100644 --- a/libraries/libstratosphere/include/stratosphere/sf/sf_exp_heap_allocator.hpp +++ b/libraries/libstratosphere/include/stratosphere/sf/sf_exp_heap_allocator.hpp @@ -57,7 +57,7 @@ namespace ams::sf { struct Globals { ExpHeapAllocator allocator; - typename std::aligned_storage::type buffer; + alignas(0x10) std::byte buffer[Size == 0 ? 1 : Size]; }; static constinit inline Globals _globals = {};