MemcachedCluster &MemcachedCluster::operator=(MemcachedCluster &&mc) noexcept {
cluster = move(mc.cluster);
memcached_clone(&memc, &mc.memc);
- returns = ReturnMatcher{&memc};
+ returns = &memc;
return *this;
}
return ReturnMatcher{memc, expected_};
}
+ReturnMatcher &ReturnMatcher::operator=(memcached_st *memc_) {
+ memc = memc_;
+ return *this;
+}
+
string ReturnMatcher::describe() const {
return "is " + to_string(expected)
+ "\n actual: " + memcached_last_error_message(memc);
bool match(const memcached_return_t &arg) const override;
ReturnMatcher success();
ReturnMatcher operator()(memcached_return_t expected_);
+ ReturnMatcher &operator=(memcached_st *memc_);
protected:
string describe() const override;