Skip to content

Commit 54af655

Browse files
author
Simon Brand
committed
Remove forward
1 parent 7eb565d commit 54af655

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

function_ref.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ template <class R, class... Args> class function_ref<R(Args...)> {
132132
: obj_(reinterpret_cast<void *>(std::addressof(f))) {
133133
callback_ = [](void *obj, Args... args) {
134134
return detail::invoke(
135-
std::forward<F>(
136-
*reinterpret_cast<typename std::add_pointer<F>::type>(obj)),
135+
*reinterpret_cast<typename std::add_pointer<F>::type>(obj),
137136
std::forward<Args>(args)...);
138137
};
139138
}
@@ -152,8 +151,7 @@ template <class R, class... Args> class function_ref<R(Args...)> {
152151
obj_ = reinterpret_cast<void *>(std::addressof(f));
153152
callback_ = [](void *obj, Args... args) {
154153
return detail::invoke(
155-
std::forward<F>(
156-
*reinterpret_cast<typename std::add_pointer<F>::type>(obj)),
154+
*reinterpret_cast<typename std::add_pointer<F>::type>(obj),
157155
std::forward<Args>(args)...);
158156
};
159157

0 commit comments

Comments
 (0)