Skip to content

Commit

Permalink
fix(config_compiler): template operator overload had compile error wi…
Browse files Browse the repository at this point in the history
…th NDK
  • Loading branch information
lotem committed Sep 18, 2017
1 parent ec940c6 commit 71817a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/rime/config/config_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ struct Reference {
string repr() const;
};

template <class StreamT>
StreamT& operator<< (StreamT& stream, const Reference& reference) {
return stream << reference.repr();
}

class ConfigCompilerPlugin;
class ResourceResolver;
struct Dependency;
Expand Down
6 changes: 3 additions & 3 deletions src/rime/config/config_compiler_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ struct Dependency {
virtual bool Resolve(ConfigCompiler* compiler) = 0;
};

template <class StreamT, class RepresentableT>
StreamT& operator<< (StreamT& stream, const RepresentableT& representable) {
return stream << representable.repr();
template <class StreamT>
StreamT& operator<< (StreamT& stream, const Dependency& dependency) {
return stream << dependency.repr();
}

struct PendingChild : Dependency {
Expand Down

0 comments on commit 71817a0

Please sign in to comment.