diff --git a/src/rime/config/config_compiler.h b/src/rime/config/config_compiler.h index 2de4dd4245..26b1595eaf 100644 --- a/src/rime/config/config_compiler.h +++ b/src/rime/config/config_compiler.h @@ -35,6 +35,11 @@ struct Reference { string repr() const; }; +template +StreamT& operator<< (StreamT& stream, const Reference& reference) { + return stream << reference.repr(); +} + class ConfigCompilerPlugin; class ResourceResolver; struct Dependency; diff --git a/src/rime/config/config_compiler_impl.h b/src/rime/config/config_compiler_impl.h index cde33a7bda..00c1df7eef 100644 --- a/src/rime/config/config_compiler_impl.h +++ b/src/rime/config/config_compiler_impl.h @@ -32,9 +32,9 @@ struct Dependency { virtual bool Resolve(ConfigCompiler* compiler) = 0; }; -template -StreamT& operator<< (StreamT& stream, const RepresentableT& representable) { - return stream << representable.repr(); +template +StreamT& operator<< (StreamT& stream, const Dependency& dependency) { + return stream << dependency.repr(); } struct PendingChild : Dependency {