[Fix] GCC compilation issue caused by template specialization (#287)

This commit is contained in:
Perdixky
2025-10-29 09:45:42 +08:00
committed by GitHub
parent a10908d3d9
commit 7d71c0f689
3 changed files with 6 additions and 4 deletions

View File

@@ -198,8 +198,10 @@ public:
}
};
template <>
struct promise_result<void> {
// WORKAROUND: GCC bug - full specialization in non-namespace scope not supported
// see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282
template <std::same_as<void> V>
struct promise_result<V> {
void return_void() noexcept {}
};

View File

@@ -175,7 +175,7 @@ struct Serde<llvm::StringRef> {
}
};
template <std::size_t N>
template <unsigned N>
struct Serde<llvm::SmallString<N>> {
using V = llvm::SmallString<N>;

View File

@@ -300,7 +300,7 @@ template <typename... Ts>
struct Struct<Inheritance<Ts...>> {
constexpr inline static bool reflectable_struct = (refl::reflectable_struct<Ts> && ...);
constexpr static std::size_t member_count = (Struct<Ts>::member_count + ...);
constexpr static std::size_t member_count = (impl::member_count<Ts>() + ...);
template <typename Object>
constexpr static auto collect_members(Object&& object) {