Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed explicit specialization compiler error of NativeInvokationManager::allocate #103

Closed
wants to merge 1 commit into from

Conversation

arcana261
Copy link

When compiling against clang, the compiler would complain of following error:

error: explicit specialization of
      'allocate' in class scope
       static void * allocate<jvalue *>(jvalue * const values) {

However, since we can't specialize template functions of template
classes outside of them without first specializing said template class
first, a workaround solution is to add a stub template struct and
forward allocate method to it.

…ager::allocate

When compiling against clang, the compiler would complain of following error:

```
error: explicit specialization of
      'allocate' in class scope
       static void * allocate<jvalue *>(jvalue * const values) {
```

However, since we can't specialize template functions of template
classes outside of them without first specializing said template class
first, a workaround solution is to add a stub template struct and
forward allocate method to it.
@arcana261
Copy link
Author

arcana261 commented May 25, 2020

My clang version is:

# fake-jni> clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@Matthewacon
Copy link
Member

Thank you for your contribution, however, the prototype version of fake-jni is no longer maintained, see the README. As stated by @meme in #104, clang 9+ is required to compile the prototype.

@Matthewacon Matthewacon added prototype Prototype code wontfix This will not be worked on labels Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prototype Prototype code wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler errors under clang 6 and ubuntu 18.04
2 participants