-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Description
Hi!
The code in
jni.hpp/include/jni/type_signature.hpp
Lines 43 to 56 in 26cc577
| template < class R, class... Args > | |
| struct TypeSignature< R (Args...) > | |
| { | |
| private: | |
| template < class... T > void DoNothingWith( T&&... ) const {} | |
| std::string Compute() const | |
| { | |
| static std::string result("("); | |
| DoNothingWith( ( result += TypeSignature<Args>()() )... ); | |
| result += ")"; | |
| result += TypeSignature<R>()(); | |
| return result; | |
| } |
It passes argument pack expansion as arguments to the function DoNothingWith(). Per standard compiler is free to arrange function arguments computation in any order - and gcc and clang disagree here. Clang computes arguments left to right, producing correct signature; android gcc 4.9 computes them right to left, producing completely invalid function signature.
You can verify it here
Metadata
Metadata
Assignees
Labels
No labels