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:
SciresM 2020-05-11 15:02:10 -07:00 committed by GitHub
parent 17b6bcfd37
commit 3a1ccdd919
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
258 changed files with 723 additions and 804 deletions

View file

@ -23,15 +23,13 @@
namespace ams::crypto::impl {
/* TODO: C++20
template<typename T>
concept HashFunction = requires(T &t, const void *cv, void *v, size_t sz) {
{ T::HashSize } -> std::same_as<size_t>;
{ T::BlockSize } -> std::same_as<size_t>;
{ t.Initialize() } -> std::same_as<void>;
{ t.Update(cv, sz) } -> std::same_as<void>;
{ t.GetHash(v, sz) } -> std::same_as<void>;
};
*/
template<typename T>
concept HashFunction = requires(T &t, const void *cv, void *v, size_t sz) {
{ T::HashSize } -> std::convertible_to<size_t>;
{ T::BlockSize } -> std::convertible_to<size_t>;
{ t.Initialize() } -> std::same_as<void>;
{ t.Update(cv, sz) } -> std::same_as<void>;
{ t.GetHash(v, sz) } -> std::same_as<void>;
};
}

View file

@ -22,7 +22,7 @@
namespace ams::crypto::impl {
template<typename Hash> /* requires HashFunction<Hash> */
template<typename Hash> requires HashFunction<Hash>
class RsaOaepImpl {
NON_COPYABLE(RsaOaepImpl);
NON_MOVEABLE(RsaOaepImpl);

View file

@ -22,7 +22,7 @@
namespace ams::crypto::impl {
template<typename Hash> /* requires HashFunction<Hash> */
template<typename Hash> requires HashFunction<Hash>
class RsaPssImpl {
NON_COPYABLE(RsaPssImpl);
NON_MOVEABLE(RsaPssImpl);

View file

@ -66,6 +66,6 @@ namespace ams::crypto::impl {
}
};
/* static_assert(HashFunction<Sha256Impl>); */
static_assert(HashFunction<Sha256Impl>);
}