Skip to content

Commit ca3ad79

Browse files
author
Vano
committed
error in CMake build fix
1 parent ee1c2aa commit ca3ad79

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/cppscript_bindings.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,48 @@ static constexpr bool assert_is_supported_type_v = assert_is_supported_type<T>::
2929

3030

3131
template<class T>
32-
static constexpr bool assert_is_ret_supported = assert_is_supported_type_v<T>;
33-
32+
struct assert_is_ret_supported {
33+
static constexpr bool value = assert_is_supported_type_v<T>;
34+
};
3435
template<>
35-
static constexpr bool assert_is_ret_supported<void> = true;
36+
struct assert_is_ret_supported<void> {
37+
static constexpr bool value = true;
38+
};
3639

3740
template <typename>
3841
struct MemberSignature;
3942

4043
template <typename Class, typename Ret, typename... Args>
4144
struct MemberSignature<Ret (Class::*)(Args...) const> {
42-
static constexpr bool value = assert_is_ret_supported<Ret> && (assert_is_supported_type_v<Args> && ...);
45+
static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type_v<Args> && ...);
4346
};
4447

4548
template <typename Class, typename Ret, typename... Args>
4649
struct MemberSignature<Ret (Class::*)(Args...)> {
47-
static constexpr bool value = assert_is_ret_supported<Ret> && (assert_is_supported_type_v<Args> && ...);
50+
static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type_v<Args> && ...);
4851
};
4952

5053
template <typename Ret, typename... Args>
5154
struct FunctionSignature;
5255

5356
template <typename Ret, typename... Args>
5457
struct FunctionSignature<Ret (*)(Args...)> {
55-
static constexpr bool value = assert_is_ret_supported<Ret> && (assert_is_supported_type_v<Args> && ...);
58+
static constexpr bool value = assert_is_ret_supported<Ret>::value && (assert_is_supported_type_v<Args> && ...);
5659
};
5760

5861

5962
template <typename Class, typename Ret, typename... Args>
60-
constexpr auto is_method_signature_supported(Ret (Class::*func)(Args...) const) {
63+
static constexpr auto is_method_signature_supported(Ret (Class::*func)(Args...) const) {
6164
return MemberSignature<decltype(func)>();
6265
}
6366

6467
template <typename Class, typename Ret, typename... Args>
65-
constexpr auto is_method_signature_supported(Ret (Class::*func)(Args...)) {
68+
static constexpr auto is_method_signature_supported(Ret (Class::*func)(Args...)) {
6669
return MemberSignature<decltype(func)>();
6770
}
6871

6972
template <typename Ret, typename... Args>
70-
constexpr auto is_function_signature_supported(Ret (*func)(Args...)) {
73+
static constexpr auto is_function_signature_supported(Ret (*func)(Args...)) {
7174
return FunctionSignature<decltype(func)>();
7275
}
7376

0 commit comments

Comments
 (0)