Skip to content

Commit af20c19

Browse files
authored
Update static_assert to use is_base_of instead of derived_from
1 parent 4a8ed98 commit af20c19

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎Source/LuaBridge/detail/CFunctions.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,7 @@ void push_class_property_getter(lua_State* L, T (U::*value), const char* debugna
25002500
template <class C, class B, class T>
25012501
void push_class_property_getter(lua_State* L, T (B::*getter)() const, const char* debugname)
25022502
{
2503-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2503+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
25042504

25052505
using GetType = decltype(getter);
25062506

@@ -2511,7 +2511,7 @@ void push_class_property_getter(lua_State* L, T (B::*getter)() const, const char
25112511
template <class C, class B, class T>
25122512
void push_class_property_getter(lua_State* L, T (B::*getter)() const noexcept, const char* debugname)
25132513
{
2514-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2514+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
25152515

25162516
using GetType = decltype(getter);
25172517

@@ -2522,7 +2522,7 @@ void push_class_property_getter(lua_State* L, T (B::*getter)() const noexcept, c
25222522
template <class C, class B, class T>
25232523
void push_class_property_getter(lua_State* L, T (B::*getter)(lua_State*) const, const char* debugname)
25242524
{
2525-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2525+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
25262526

25272527
using GetType = decltype(getter);
25282528

@@ -2533,7 +2533,7 @@ void push_class_property_getter(lua_State* L, T (B::*getter)(lua_State*) const,
25332533
template <class C, class B, class T>
25342534
void push_class_property_getter(lua_State* L, T (B::*getter)(lua_State*) const noexcept, const char* debugname)
25352535
{
2536-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2536+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
25372537

25382538
using GetType = decltype(getter);
25392539

@@ -2671,7 +2671,7 @@ void push_class_property_setter(lua_State* L, T U::*value, const char* debugname
26712671
template <class C, class B, class T>
26722672
void push_class_property_setter(lua_State* L, void (B::*setter)(T), const char* debugname)
26732673
{
2674-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2674+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
26752675

26762676
using SetType = decltype(setter);
26772677

@@ -2682,7 +2682,7 @@ void push_class_property_setter(lua_State* L, void (B::*setter)(T), const char*
26822682
template <class C, class B, class T>
26832683
void push_class_property_setter(lua_State* L, void (B::*setter)(T) noexcept, const char* debugname)
26842684
{
2685-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2685+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
26862686

26872687
using SetType = decltype(setter);
26882688

@@ -2693,7 +2693,7 @@ void push_class_property_setter(lua_State* L, void (B::*setter)(T) noexcept, con
26932693
template <class C, class B, class T>
26942694
void push_class_property_setter(lua_State* L, void (B::*setter)(T, lua_State*), const char* debugname)
26952695
{
2696-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2696+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
26972697

26982698
using SetType = decltype(setter);
26992699

@@ -2704,7 +2704,7 @@ void push_class_property_setter(lua_State* L, void (B::*setter)(T, lua_State*),
27042704
template <class C, class B, class T>
27052705
void push_class_property_setter(lua_State* L, void (B::*setter)(T, lua_State*) noexcept, const char* debugname)
27062706
{
2707-
static_assert(std::is_same_v<C, B> || std::derived_from<C, B>);
2707+
static_assert(std::is_same_v<C, B> || std::is_base_of_v<B, C>);
27082708

27092709
using SetType = decltype(setter);
27102710

0 commit comments

Comments
 (0)