Switch atmosphere's build target to C++20. (#952)
* ams: update to build with gcc10/c++20 * remove mno-outline-atomics * ams: take care of most TODO C++20s * fusee/sept: update for gcc10 * whoosh, your code now uses pre-compiled headers * make: dependency fixes
This commit is contained in:
@@ -43,6 +43,6 @@ namespace ams::fs {
|
||||
return this->Get();
|
||||
}
|
||||
};
|
||||
static_assert(std::is_pod<Int64>::value);
|
||||
static_assert(util::is_pod<Int64>::value);
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ namespace ams::fs {
|
||||
Position next_dir;
|
||||
Position next_file;
|
||||
};
|
||||
static_assert(std::is_pod<FindPosition>::value);
|
||||
static_assert(util::is_pod<FindPosition>::value);
|
||||
|
||||
using DirectoryInfo = RomDirectoryInfo;
|
||||
using FileInfo = RomFileInfo;
|
||||
@@ -56,13 +56,13 @@ namespace ams::fs {
|
||||
Position dir;
|
||||
Position file;
|
||||
};
|
||||
static_assert(std::is_pod<RomDirectoryEntry>::value);
|
||||
static_assert(util::is_pod<RomDirectoryEntry>::value);
|
||||
|
||||
struct RomFileEntry {
|
||||
Position next;
|
||||
FileInfo info;
|
||||
};
|
||||
static_assert(std::is_pod<RomFileEntry>::value);
|
||||
static_assert(util::is_pod<RomFileEntry>::value);
|
||||
|
||||
static constexpr inline u32 MaxKeyLength = RomPathTool::MaxPathLength;
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace ams::fs {
|
||||
return RomPathTool::IsEqualPath(reinterpret_cast<const RomPathChar *>(aux_lhs), reinterpret_cast<const RomPathChar *>(aux_rhs), aux_lhs_size / sizeof(RomPathChar));
|
||||
}
|
||||
};
|
||||
static_assert(std::is_pod<RomEntryKey>::value);
|
||||
static_assert(util::is_pod<RomEntryKey>::value);
|
||||
|
||||
struct EntryKey {
|
||||
RomEntryKey key;
|
||||
@@ -126,7 +126,7 @@ namespace ams::fs {
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
static_assert(std::is_pod<EntryKey>::value);
|
||||
static_assert(util::is_pod<EntryKey>::value);
|
||||
|
||||
using DirectoryEntryMapTable = EntryMapTable<RomEntryKey, EntryKey, RomDirectoryEntry>;
|
||||
using FileEntryMapTable = EntryMapTable<RomEntryKey, EntryKey, RomFileEntry>;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ams::fs {
|
||||
BucketIndex ind;
|
||||
Position pos;
|
||||
};
|
||||
static_assert(std::is_pod<FindIndex>::value);
|
||||
static_assert(util::is_pod<FindIndex>::value);
|
||||
private:
|
||||
static constexpr inline Position InvalidPosition = ~Position();
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace ams::fs {
|
||||
Position next;
|
||||
u32 size;
|
||||
};
|
||||
static_assert(std::is_pod<Element>::value);
|
||||
static_assert(util::is_pod<Element>::value);
|
||||
private:
|
||||
s64 bucket_count;
|
||||
SubStorage bucket_storage;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace ams::fs {
|
||||
size_t length;
|
||||
const RomPathChar *path;
|
||||
};
|
||||
static_assert(std::is_pod<RomEntryName>::value);
|
||||
static_assert(util::is_pod<RomEntryName>::value);
|
||||
|
||||
constexpr void InitializeRomEntryName(RomEntryName *entry) {
|
||||
AMS_ABORT_UNLESS(entry != nullptr);
|
||||
|
||||
@@ -34,19 +34,19 @@ namespace ams::fs {
|
||||
s64 file_entry_size;
|
||||
s64 body_offset;
|
||||
};
|
||||
static_assert(std::is_pod<RomFileSystemInformation>::value);
|
||||
static_assert(util::is_pod<RomFileSystemInformation>::value);
|
||||
static_assert(sizeof(RomFileSystemInformation) == 0x50);
|
||||
|
||||
struct RomDirectoryInfo {
|
||||
/* ... */
|
||||
};
|
||||
static_assert(std::is_pod<RomDirectoryInfo>::value);
|
||||
static_assert(util::is_pod<RomDirectoryInfo>::value);
|
||||
|
||||
struct RomFileInfo {
|
||||
Int64 offset;
|
||||
Int64 size;
|
||||
};
|
||||
static_assert(std::is_pod<RomFileInfo>::value);
|
||||
static_assert(util::is_pod<RomFileInfo>::value);
|
||||
|
||||
namespace RomStringTraits {
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace ams::fs {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
static_assert(std::is_pod<ReadOption>::value && sizeof(ReadOption) == sizeof(u32));
|
||||
static_assert(util::is_pod<ReadOption>::value && sizeof(ReadOption) == sizeof(u32));
|
||||
|
||||
struct WriteOption {
|
||||
u32 value;
|
||||
@@ -58,7 +58,7 @@ namespace ams::fs {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
static_assert(std::is_pod<WriteOption>::value && sizeof(WriteOption) == sizeof(u32));
|
||||
static_assert(util::is_pod<WriteOption>::value && sizeof(WriteOption) == sizeof(u32));
|
||||
|
||||
struct FileHandle {
|
||||
void *handle;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace ams::fs {
|
||||
|
||||
template<typename T>
|
||||
std::unique_ptr<T, Deleter> MakeUnique() {
|
||||
static_assert(std::is_pod<T>::value);
|
||||
static_assert(util::is_pod<T>::value);
|
||||
return std::unique_ptr<T, Deleter>(static_cast<T *>(::ams::fs::impl::Allocate(sizeof(T))), Deleter(sizeof(T)));
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace ams::fs {
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(std::is_pod<QueryRangeInfo>::value);
|
||||
static_assert(util::is_pod<QueryRangeInfo>::value);
|
||||
static_assert(sizeof(QueryRangeInfo) == 0x40);
|
||||
static_assert(sizeof(QueryRangeInfo) == sizeof(::FsRangeInfo));
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace ams::fs {
|
||||
u64 data64[2];
|
||||
};
|
||||
static_assert(sizeof(RightsId) == 0x10);
|
||||
static_assert(std::is_pod<RightsId>::value);
|
||||
static_assert(util::is_pod<RightsId>::value);
|
||||
|
||||
inline bool operator==(const RightsId &lhs, const RightsId &rhs) {
|
||||
return std::memcmp(std::addressof(lhs), std::addressof(rhs), sizeof(RightsId)) == 0;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace ams::fs {
|
||||
struct UserId {
|
||||
u64 data[2];
|
||||
};
|
||||
static_assert(std::is_pod<UserId>::value);
|
||||
static_assert(util::is_pod<UserId>::value);
|
||||
|
||||
constexpr inline bool operator<(const UserId &lhs, const UserId &rhs) {
|
||||
if (lhs.data[0] < rhs.data[0]) {
|
||||
@@ -92,7 +92,7 @@ namespace ams::fs {
|
||||
bool pseudo;
|
||||
u8 reserved[0x1A];
|
||||
};
|
||||
static_assert(std::is_pod<SaveDataCreationInfo>::value);
|
||||
static_assert(util::is_pod<SaveDataCreationInfo>::value);
|
||||
static_assert(sizeof(SaveDataCreationInfo) == 0x40);
|
||||
|
||||
struct SaveDataAttribute {
|
||||
@@ -154,6 +154,6 @@ namespace ams::fs {
|
||||
u8 unused[0x190];
|
||||
};
|
||||
static_assert(sizeof(SaveDataExtraData) == 0x200);
|
||||
static_assert(std::is_pod<SaveDataExtraData>::value);
|
||||
static_assert(util::is_pod<SaveDataExtraData>::value);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user