[common] replace Common:: stuffs with libstdc++ equivalents
Some checks failed
eden-license / license-header (pull_request) Failing after 22s
Some checks failed
eden-license / license-header (pull_request) Failing after 22s
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
e75ceb676b
commit
1893237a55
7 changed files with 18 additions and 52 deletions
|
@ -129,19 +129,4 @@ namespace Common {
|
|||
u64(g) << 48 | u64(h) << 56;
|
||||
}
|
||||
|
||||
// std::size() does not support zero-size C arrays. We're fixing that.
|
||||
template <class C>
|
||||
constexpr auto Size(const C& c) -> decltype(c.size()) {
|
||||
return std::size(c);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
constexpr std::size_t Size(const C& c) {
|
||||
if constexpr (sizeof(C) == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return std::size(c);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue