ams: build with -std=gnu++23

This commit is contained in:
Michael Scire 2024-05-26 15:39:00 -07:00 committed by SciresM
parent f35c94810c
commit 1609f804f2
9 changed files with 15 additions and 11 deletions

View file

@ -73,7 +73,7 @@ namespace ams::emummc {
/* Retrieve and cache values. */
{
typename std::aligned_storage<2 * (MaxDirLen + 1), os::MemoryPageSize>::type path_storage;
alignas(os::MemoryPageSize) std::byte path_storage[2 * (MaxDirLen + 1)];
struct {
char file_path[MaxDirLen + 1];

View file

@ -23,8 +23,8 @@ namespace ams::fs {
#if defined(ATMOSPHERE_OS_HORIZON)
namespace {
constinit std::aligned_storage_t<0x80> g_fsp_service_object_buffer;
constinit std::aligned_storage_t<0x80> g_fsp_ldr_service_object_buffer;
alignas(0x10) constinit std::byte g_fsp_service_object_buffer[0x80] = {};
alignas(0x10) constinit std::byte g_fsp_ldr_service_object_buffer[0x80] = {};
constinit bool g_use_static_fsp_service_object_buffer = false;
constinit bool g_use_static_fsp_ldr_service_object_buffer = false;

View file

@ -20,7 +20,7 @@ namespace ams::fssrv::impl {
namespace {
constinit std::aligned_storage<0x80>::type g_static_buffer_for_program_info_for_initial_process = {};
alignas(0x10) constinit std::byte g_static_buffer_for_program_info_for_initial_process[0x80] = {};
template<typename T>
class StaticAllocatorForProgramInfoForInitialProcess : public std::allocator<T> {

View file

@ -41,7 +41,7 @@ namespace ams::htc::server::rpc {
#else
static constexpr size_t MaxTaskSize = 0xE1D8;
#endif
using TaskStorage = typename std::aligned_storage<MaxTaskSize, alignof(void *)>::type;
struct TaskStorage { alignas(alignof(void *)) std::byte _storage[MaxTaskSize]; };
private:
bool m_valid[MaxRpcCount]{};
TaskStorage m_storages[MaxRpcCount]{};

View file

@ -19,9 +19,13 @@
namespace ams::osdbg::impl {
template<size_t Size, int NumPointers, size_t Alignment>
using AlignedStorageIlp32 = typename std::aligned_storage<Size + NumPointers * sizeof(u32), Alignment>::type;
struct AlignedStorageIlp32 {
alignas(Alignment) std::byte _storage[Size + NumPointers * sizeof(u32)];
};
template<size_t Size, int NumPointers, size_t Alignment>
using AlignedStorageLp64 = typename std::aligned_storage<Size + NumPointers * sizeof(u64), Alignment>::type;
struct AlignedStorageLp64 {
alignas(Alignment) std::byte _storage[Size + NumPointers * sizeof(u64)];
};
}