Skip to content

Commit 69a84f7

Browse files
daedricjfirebaugh
authored andcommitted
Work around false ambiguity bug in GCC
1 parent 5758909 commit 69a84f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/jni/class.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace jni
9090

9191
template < class R, class... Args >
9292
auto Call(JNIEnv& env, const StaticMethod<TagType, R (Args...)>& method, const Args&... args) const
93-
-> std::enable_if_t< !IsPrimitive<R>::value, R >
93+
-> std::enable_if_t< !IsPrimitive<R>::value && !std::is_void<R>::value, R >
9494
{
9595
return R(reinterpret_cast<UntaggedType<R>>(CallStaticMethod<jobject*>(env, *clazz, method, Untag(args)...)));
9696
}

include/jni/object.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ namespace jni
106106

107107
template < class R, class... Args >
108108
auto Call(JNIEnv& env, const Method<TagType, R (Args...)>& method, const Args&... args) const
109-
-> std::enable_if_t< !IsPrimitive<R>::value, R >
109+
-> std::enable_if_t< !IsPrimitive<R>::value && !std::is_void<R>::value, R >
110110
{
111111
return R(reinterpret_cast<UntaggedType<R>>(CallMethod<jobject*>(env, obj, method, Untag(args)...)));
112112
}

0 commit comments

Comments
 (0)