exo/meso: update for gcc 11 compatibility

This commit is contained in:
Michael Scire 2021-04-26 16:56:00 -07:00
parent 19be54ff95
commit 4f16106702
13 changed files with 102 additions and 51 deletions

View file

@ -23,6 +23,7 @@
#include <vapours/util/util_size.hpp>
#include <vapours/util/util_int_util.hpp>
#include <vapours/util/util_aligned_buffer.hpp>
#include <vapours/util/util_enum.hpp>
#include <vapours/util/util_endian.hpp>
#include <vapours/util/util_exchange.hpp>
#include <vapours/util/util_scope_guard.hpp>

View file

@ -0,0 +1,32 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <vapours/common.hpp>
#include <vapours/assert.hpp>
namespace ams::util {
template<typename Enum> requires std::is_enum<Enum>::value
constexpr ALWAYS_INLINE typename std::underlying_type<Enum>::type ToUnderlying(Enum e) {
return static_cast<typename std::underlying_type<Enum>::type>(e);
}
template<typename Enum> requires std::is_enum<Enum>::value
constexpr ALWAYS_INLINE Enum FromUnderlying(typename std::underlying_type<Enum>::type v) {
return static_cast<Enum>(v);
}
}

View file

@ -104,7 +104,7 @@ namespace ams::util {
return this->next;
}
};
static_assert(std::is_literal_type<IntrusiveListNode>::value);
/* DEPRECATED: static_assert(std::is_literal_type<IntrusiveListNode>::value); */
namespace impl {

View file

@ -139,7 +139,7 @@ namespace ams::util {
using DeducedParentType = GetParentType<MemberPtr>;
using MemberType = GetMemberType<MemberPtr>;
static_assert(std::is_base_of<DeducedParentType, RealParentType>::value || std::is_same<RealParentType, DeducedParentType>::value);
static_assert(std::is_literal_type<MemberType>::value);
/* DEPRECATED: static_assert(std::is_literal_type<MemberType>::value); */
return OffsetOfCalculator<RealParentType, MemberType>::OffsetOf(MemberPtr);
}();