Skip to content

Commit 1d4e6f4

Browse files
committed
Merge branch 'master' into cmake_love
2 parents fb92d2d + b87a35a commit 1d4e6f4

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

include/tl/function_ref.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,7 @@ template <class R, class... Args> class function_ref<R(Args...)> {
161161

162162
/// Makes `*this` refer to the same callable as `rhs`.
163163
TL_FUNCTION_REF_11_CONSTEXPR function_ref<R(Args...)> &
164-
operator=(const function_ref<R(Args...)> &rhs) noexcept {
165-
obj_ = rhs.obj_;
166-
callback_ = rhs.callback_;
167-
return *this;
168-
}
164+
operator=(const function_ref<R(Args...)> &rhs) noexcept = default;
169165

170166
/// Makes `*this` refer to `f`.
171167
///

tests/issues.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tl::function_ref<Fruit* ()> bar()
1818
}
1919

2020
TEST_CASE("Issue #9") {
21-
bar()();
21+
bar();
2222
}
2323

2424
void foo(const tl::function_ref<int(const std::vector<int>)>& func) {

0 commit comments

Comments
 (0)