[common] replace Common:: stuffs with libstdc++ equivalents
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:
lizzie 2025-08-21 10:16:43 +00:00
parent e75ceb676b
commit 1893237a55
Signed by: Lizzie
GPG key ID: 00287378CADCAB13
7 changed files with 18 additions and 52 deletions

View file

@ -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