Use concepts for Backing::Read over enable_if

This commit is contained in:
Billy Laws 2021-07-17 17:12:18 +01:00
parent b5b86f41a3
commit 01d58dee27

View File

@ -3,6 +3,7 @@
#pragma once #pragma once
#include <concepts>
#include <common.h> #include <common.h>
namespace skyline::vfs { namespace skyline::vfs {
@ -82,7 +83,7 @@ namespace skyline::vfs {
/** /**
* @brief Implicit casting for reading into spans of different types * @brief Implicit casting for reading into spans of different types
*/ */
template<typename T, typename std::enable_if<!std::is_same_v<T, u8>, bool>::type = true> template<typename T> requires (!std::same_as<T, u8>)
size_t Read(span <T> output, size_t offset = 0) { size_t Read(span <T> output, size_t offset = 0) {
return Read(output.template cast<u8>(), offset); return Read(output.template cast<u8>(), offset);
} }