mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-17 12:44:42 +03:00
Fixed invoke() example to not forward the functor, to reflect other discussion
This commit is contained in:
@@ -2347,8 +2347,8 @@ In that case, and only that case, make the parameter `TP&&` where `TP` is a temp
|
||||
##### Example
|
||||
|
||||
template <class F, class... Args>
|
||||
inline auto invoke(F&& f, Args&&... args) {
|
||||
return forward<F>(f)(forward<Args>(args)...);
|
||||
inline auto invoke(F f, Args&&... args) {
|
||||
return f(forward<Args>(args)...);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user