Skip to content

Instantly share code, notes, and snippets.

@luser

luser/compile error

Created Aug 18, 2020
Embed
What would you like to do?
In file included from /build/mcpelauncher/fake-jni/examples/src/main.cpp:3:
In file included from /build/mcpelauncher/fake-jni/include/fake-jni/jvm.h:5:
/build/mcpelauncher/fake-jni/include/fake-jni/internal/meta/field.h:61:73: error: conversion from 'FakeJni::JString' to 'jvalue' is ambiguous
((T*)inst)->*((type_t)field) = ValueTranslator<F>::convert_set(env, *((F*)value));
^~~~~~~~~~~~
/build/mcpelauncher/fake-jni/include/fake-jni/jvm.h:1465:59: note: in instantiation of member function 'FakeJni::_CX::FieldAccessor<FakeJni::JString ExampleClass::*>::set' requested here
proxySetFunc((void (*)())&_CX::FieldAccessor<T (M::*)>::set),
^
/build/mcpelauncher/fake-jni/include/fake-jni/jvm.h:1386:38: note: in instantiation of function template specialization 'FakeJni::JFieldID::JFieldID<FakeJni::JString, ExampleClass>' requested here
return clazz->registerField(new JFieldID(field.field, name, modifiers));
^
/build/mcpelauncher/fake-jni/include/fake-jni/internal/meta/types.h:159:2: note: candidate constructor [with T = FakeJni::JString]
jvalue(T t) noexcept {
^
/build/mcpelauncher/fake-jni/include/fake-jni/string.h:19:3: note: candidate function [with T = jvalue]
operator T() const;
^
/build/mcpelauncher/fake-jni/include/fake-jni/internal/meta/field.h:24:58: note: passing argument to parameter 'value' here
inline static T convert_set(JniEnv const &env, jvalue value) {
^
In file included from /build/mcpelauncher/fake-jni/examples/src/main.cpp:3:
In file included from /build/mcpelauncher/fake-jni/include/fake-jni/jvm.h:4:
/build/mcpelauncher/fake-jni/include/fake-jni/internal/meta/types.h:175:3: error: static_assert failed due to requirement 'isPrimitive || (__is_class(FakeJni::JString) && CX::IsPointer<FakeJni::JString>::value)'
static_assert(isPrimitive || (__is_class(component_t) && CX::IsPointer<T>::value));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/mcpelauncher/fake-jni/include/fake-jni/internal/meta/field.h:25:16: note: in instantiation of function template specialization 'jvalue::operator JString<FakeJni::JString>' requested here
return (T) value;
^
/build/mcpelauncher/fake-jni/include/fake-jni/internal/meta/field.h:61:56: note: in instantiation of member function 'FakeJni::_CX::ValueTranslator<FakeJni::JString>::convert_set' requested here
((T*)inst)->*((type_t)field) = ValueTranslator<F>::convert_set(env, *((F*)value));
^
/build/mcpelauncher/fake-jni/include/fake-jni/jvm.h:1465:59: note: in instantiation of member function 'FakeJni::_CX::FieldAccessor<FakeJni::JString ExampleClass::*>::set' requested here
proxySetFunc((void (*)())&_CX::FieldAccessor<T (M::*)>::set),
^
/build/mcpelauncher/fake-jni/include/fake-jni/jvm.h:1386:38: note: in instantiation of function template specialization 'FakeJni::JFieldID::JFieldID<FakeJni::JString, ExampleClass>' requested here
return clazz->registerField(new JFieldID(field.field, name, modifiers));
^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment