|
@@ -76,7 +76,7 @@ class poly_vtable {
|
|
|
[[nodiscard]] static ENTT_CONSTEVAL auto make_vtable(type_list<Func...>) noexcept {
|
|
[[nodiscard]] static ENTT_CONSTEVAL auto make_vtable(type_list<Func...>) noexcept {
|
|
|
if constexpr(sizeof...(Func) == 0u) {
|
|
if constexpr(sizeof...(Func) == 0u) {
|
|
|
return decltype(make_vtable(typename Concept::template impl<inspector>{})){};
|
|
return decltype(make_vtable(typename Concept::template impl<inspector>{})){};
|
|
|
- } else if constexpr((std::is_function_v<Func> && ...)) {
|
|
|
|
|
|
|
+ } else if constexpr((stl::is_function_v<Func> && ...)) {
|
|
|
return decltype(stl::make_tuple(vtable_entry(stl::declval<Func inspector::*>())...)){};
|
|
return decltype(stl::make_tuple(vtable_entry(stl::declval<Func inspector::*>())...)){};
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -143,7 +143,7 @@ struct poly_base {
|
|
|
[[nodiscard]] decltype(auto) invoke(const poly_base &self, Args &&...args) const {
|
|
[[nodiscard]] decltype(auto) invoke(const poly_base &self, Args &&...args) const {
|
|
|
const auto &poly = static_cast<const Poly &>(self);
|
|
const auto &poly = static_cast<const Poly &>(self);
|
|
|
|
|
|
|
|
- if constexpr(std::is_function_v<stl::remove_pointer_t<decltype(poly.vtable)>>) {
|
|
|
|
|
|
|
+ if constexpr(stl::is_function_v<stl::remove_pointer_t<decltype(poly.vtable)>>) {
|
|
|
return poly.vtable(poly.storage, stl::forward<Args>(args)...);
|
|
return poly.vtable(poly.storage, stl::forward<Args>(args)...);
|
|
|
} else {
|
|
} else {
|
|
|
return std::get<Member>(*poly.vtable)(poly.storage, stl::forward<Args>(args)...);
|
|
return std::get<Member>(*poly.vtable)(poly.storage, stl::forward<Args>(args)...);
|
|
@@ -155,7 +155,7 @@ struct poly_base {
|
|
|
[[nodiscard]] decltype(auto) invoke(poly_base &self, Args &&...args) {
|
|
[[nodiscard]] decltype(auto) invoke(poly_base &self, Args &&...args) {
|
|
|
auto &poly = static_cast<Poly &>(self);
|
|
auto &poly = static_cast<Poly &>(self);
|
|
|
|
|
|
|
|
- if constexpr(std::is_function_v<stl::remove_pointer_t<decltype(poly.vtable)>>) {
|
|
|
|
|
|
|
+ if constexpr(stl::is_function_v<stl::remove_pointer_t<decltype(poly.vtable)>>) {
|
|
|
static_assert(Member == 0u, "Unknown member");
|
|
static_assert(Member == 0u, "Unknown member");
|
|
|
return poly.vtable(poly.storage, stl::forward<Args>(args)...);
|
|
return poly.vtable(poly.storage, stl::forward<Args>(args)...);
|
|
|
} else {
|
|
} else {
|