diff --git a/include/turtle/detail/expectation.hpp b/include/turtle/detail/expectation.hpp index 18b9bb23..d4e477aa 100644 --- a/include/turtle/detail/expectation.hpp +++ b/include/turtle/detail/expectation.hpp @@ -123,16 +123,14 @@ namespace mock { namespace detail { void invoke(std::unique_ptr i) { invocation_ = std::move(i); } template - std::enable_if_t<(arity > 0u) && sizeof...(Constraints) == arity, expectation&> with(Constraints... c) + std::enable_if_t<(arity > 0u) && sizeof...(Constraints) == arity> with(Constraints... c) { matcher_ = std::make_unique>(c...); - return *this; } template - std::enable_if_t<(Arity > 1u), expectation&> with(const Constraint& c) + std::enable_if_t<(Arity > 1u)> with(const Constraint& c) { matcher_ = std::make_unique>(c); - return *this; } void add(sequence& s)