@@ -25,37 +25,34 @@ struct is_supported_type {
25
25
// MSVC needs this for no reason
26
26
template <class T >
27
27
struct is_supported_type <godot::BitField<T>> {
28
- static constexpr bool value = is_defined<godot::GetTypeInfo< int64_t >>::value ;
28
+ static constexpr bool value = true ;
29
29
};
30
- //
31
-
32
- template <class T >
33
- static constexpr bool is_supported_type_v = is_supported_type<T>::value;
34
30
35
- // And this
36
31
template <>
37
- static constexpr bool is_supported_type_v<godot::Variant**> = true ;
32
+ struct is_supported_type <godot::Variant**> {
33
+ static constexpr bool value = true ;
34
+ };
38
35
39
36
template <>
40
- static constexpr bool is_supported_type_v<const godot::Variant**> = true ;
37
+ struct is_supported_type <const godot::Variant**> {
38
+ static constexpr bool value = true ;
39
+ };
41
40
42
41
template <>
43
- static constexpr bool is_supported_type_v<GDExtensionCallError&> = true ;
42
+ struct is_supported_type <GDExtensionCallError&> {
43
+ static constexpr bool value = true ;
44
+ };
44
45
//
45
46
46
47
template <class T >
47
48
struct assert_is_supported_type {
48
- static constexpr bool value = is_supported_type_v <T>;
49
- static_assert (is_supported_type_v <T>, " Type not supported. If it's your custom class, either it had complilation errors, or maybe you forgot to register it with GCLASS()" );
49
+ static constexpr bool value = is_supported_type <T>::value ;
50
+ static_assert (is_supported_type <T>::value , " Type not supported. If it's your custom class, either it had complilation errors, or maybe you forgot to register it with GCLASS()" );
50
51
};
51
52
52
- template <class T >
53
- static constexpr bool assert_is_supported_type_v = assert_is_supported_type<T>::value;
54
-
55
-
56
53
template <class T >
57
54
struct assert_is_ret_supported {
58
- static constexpr bool value = assert_is_supported_type_v <T>;
55
+ static constexpr bool value = assert_is_supported_type <T>::value ;
59
56
};
60
57
template <>
61
58
struct assert_is_ret_supported <void > {
@@ -67,20 +64,20 @@ struct MemberSignature;
67
64
68
65
template <typename Class, typename Ret, typename ... Args>
69
66
struct MemberSignature <Ret (Class::*)(Args...) const > {
70
- static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type_v <Args> && ...);
67
+ static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type <Args>::value && ...);
71
68
};
72
69
73
70
template <typename Class, typename Ret, typename ... Args>
74
71
struct MemberSignature <Ret (Class::*)(Args...)> {
75
- static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type_v <Args> && ...);
72
+ static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type <Args>::value && ...);
76
73
};
77
74
78
75
template <typename Ret, typename ... Args>
79
76
struct FunctionSignature ;
80
77
81
78
template <typename Ret, typename ... Args>
82
79
struct FunctionSignature <Ret (*)(Args...)> {
83
- static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type_v <Args> && ...);
80
+ static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type <Args>::value && ...);
84
81
};
85
82
86
83
@@ -172,13 +169,13 @@ _FORCE_INLINE_ void destroy_object(T& obj) {
172
169
173
170
template <class T , class ...Args>
174
171
_FORCE_INLINE_ godot::PropertyInfo MakePropertyInfo (Args&&... args) {
175
- static_assert (impl::assert_is_supported_type_v <T>, " Property of this type is not supported" );
172
+ static_assert (impl::assert_is_supported_type <T>::value , " Property of this type is not supported" );
176
173
177
174
using IsResource = impl::IsResourceProperty<T>;
178
175
if constexpr (sizeof ...(Args) == 1 && IsResource::value) {
179
- return impl::BindCheck<impl::assert_is_supported_type_v <T>>::template MakePropertyInfo<T>(std::forward<Args>(args)..., godot::PROPERTY_HINT_RESOURCE_TYPE, IsResource::type::get_class_static ());
176
+ return impl::BindCheck<impl::assert_is_supported_type <T>::value >::template MakePropertyInfo<T>(std::forward<Args>(args)..., godot::PROPERTY_HINT_RESOURCE_TYPE, IsResource::type::get_class_static ());
180
177
} else {
181
- return impl::BindCheck<impl::assert_is_supported_type_v <T>>::template MakePropertyInfo<T>(std::forward<Args>(args)...);
178
+ return impl::BindCheck<impl::assert_is_supported_type <T>::value >::template MakePropertyInfo<T>(std::forward<Args>(args)...);
182
179
}
183
180
}
184
181
0 commit comments