From ab83eac703d2fceabb2e6861261734761c76511e Mon Sep 17 00:00:00 2001 From: deadlocklogic <57906342+deadlocklogic@users.noreply.github.com> Date: Sat, 18 May 2024 15:53:52 +0300 Subject: [PATCH] call.hpp: std::is_base_of_v is false, use is_same_v --- include/sol/call.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sol/call.hpp b/include/sol/call.hpp index 705b22f0..59d01935 100644 --- a/include/sol/call.hpp +++ b/include/sol/call.hpp @@ -478,7 +478,7 @@ namespace sol { using object_type = typename wrap::object_type; if constexpr (sizeof...(Args) < 1) { using Ta = meta::conditional_t, object_type, T>; - static_assert(std::is_base_of_v, + static_assert(std::is_same_v || std::is_base_of_v, "It seems like you might have accidentally bound a class type with a member function method that does not correspond to the " "class. For example, there could be a small type in your new_usertype(...) binding, where you specify one class \"T\" " "but then bind member methods from a complete unrelated class. Check things over!"); @@ -511,7 +511,7 @@ namespace sol { if constexpr (is_index) { if constexpr (sizeof...(Args) < 1) { using Ta = meta::conditional_t, object_type, T>; - static_assert(std::is_base_of_v, + static_assert(std::is_same_v || std::is_base_of_v, "It seems like you might have accidentally bound a class type with a member function method that does not correspond " "to the class. For example, there could be a small type in your new_usertype(...) binding, where you specify one " "class \"T\" but then bind member methods from a complete unrelated class. Check things over!");