Index: librime-1.1git20140306/include/rime/algo/calculus.h =================================================================== --- librime-1.1git20140306.orig/include/rime/algo/calculus.h +++ librime-1.1git20140306/include/rime/algo/calculus.h @@ -22,11 +22,12 @@ class Calculation { using Factory = Calculation* (const std::vector& args); Calculation() = default; - virtual ~Calculation() = default; + virtual ~Calculation(); virtual bool Apply(Spelling* spelling) = 0; virtual bool addition() { return true; } virtual bool deletion() { return true; } }; +inline Calculation::~Calculation() = default; class Calculus { public: Index: librime-1.1git20140306/include/rime/dict/db.h =================================================================== --- librime-1.1git20140306.orig/include/rime/dict/db.h +++ librime-1.1git20140306/include/rime/dict/db.h @@ -18,7 +18,7 @@ class DbAccessor { DbAccessor() = default; explicit DbAccessor(const std::string& prefix) : prefix_(prefix) {} - virtual ~DbAccessor() = default; + virtual ~DbAccessor(); virtual bool Reset() = 0; virtual bool Jump(const std::string &key) = 0; @@ -30,11 +30,12 @@ class DbAccessor { std::string prefix_; }; +inline DbAccessor::~DbAccessor() = default; class Db : public Class { public: explicit Db(const std::string& name); - virtual ~Db() = default; + virtual ~Db(); bool Exists() const; bool Remove(); @@ -72,11 +73,12 @@ class Db : public Class* code) = 0; }; +inline PhraseCollector::~PhraseCollector() = default; class Config; class Encoder { public: Encoder(PhraseCollector* collector) : collector_(collector) {} - virtual ~Encoder() = default; + virtual ~Encoder(); virtual bool LoadSettings(Config* config) { return false; @@ -53,7 +54,7 @@ class Encoder { protected: PhraseCollector* collector_; }; - +inline Encoder::~Encoder() = default; // Aa : code at index 0 for character at index 0 // Az : code at index -1 for character at index 0 // Za : code at index 0 for character at index -1 Index: librime-1.1git20140306/include/rime/candidate.h =================================================================== --- librime-1.1git20140306.orig/include/rime/candidate.h +++ librime-1.1git20140306/include/rime/candidate.h @@ -21,7 +21,7 @@ class Candidate { size_t end, double quality = 0.) : type_(type), start_(start), end_(end), quality_(quality) {} - virtual ~Candidate() = default; + virtual ~Candidate(); static shared_ptr GetGenuineCandidate(const shared_ptr& cand); @@ -53,6 +53,7 @@ class Candidate { size_t end_ = 0; double quality_ = 0.; }; +inline Candidate::~Candidate() = default; using CandidateList = std::vector>; Index: librime-1.1git20140306/include/rime/component.h =================================================================== --- librime-1.1git20140306.orig/include/rime/component.h +++ librime-1.1git20140306/include/rime/component.h @@ -16,8 +16,9 @@ namespace rime { class ComponentBase { public: ComponentBase() = default; - virtual ~ComponentBase() = default; + virtual ~ComponentBase(); }; +inline ComponentBase::~ComponentBase() = default; template struct Class { Index: librime-1.1git20140306/include/rime/config.h =================================================================== --- librime-1.1git20140306.orig/include/rime/config.h +++ librime-1.1git20140306/include/rime/config.h @@ -22,7 +22,7 @@ class ConfigItem { enum ValueType { kNull, kScalar, kList, kMap }; ConfigItem() = default; // null - virtual ~ConfigItem() = default; + virtual ~ConfigItem(); ValueType type() const { return type_; } @@ -31,6 +31,7 @@ class ConfigItem { ValueType type_ = kNull; }; +inline ConfigItem::~ConfigItem() = default; using ConfigItemPtr = shared_ptr; Index: librime-1.1git20140306/include/rime/deployer.h =================================================================== --- librime-1.1git20140306.orig/include/rime/deployer.h +++ librime-1.1git20140306/include/rime/deployer.h @@ -25,10 +25,11 @@ using TaskInitializer = boost::any; class DeploymentTask : public Class { public: DeploymentTask() = default; - virtual ~DeploymentTask() = default; + virtual ~DeploymentTask(); virtual bool Run(Deployer* deployer) = 0; }; +inline DeploymentTask::~DeploymentTask() = default; class Deployer : public Messenger { public: Index: librime-1.1git20140306/include/rime/filter.h =================================================================== --- librime-1.1git20140306.orig/include/rime/filter.h +++ librime-1.1git20140306/include/rime/filter.h @@ -22,7 +22,7 @@ class Filter : public Class Query(const std::string& input, const Segment& segment, @@ -33,6 +33,7 @@ class Translator : public Class int operator<< (SourceType& source); }; +inline Sink::~Sink() = default; class Source { public: - virtual ~Source() = default; + virtual ~Source(); virtual bool MetaGet(std::string* key, std::string* value) = 0; virtual bool Get(std::string* key, std::string* value) = 0; @@ -33,6 +34,7 @@ class Source { int Dump(Sink* sink); }; +inline Source::~Source() = default; template int Sink::operator<< (SourceType& source) {