From 247be64de617b5b150e1e1c455a0f8eaa66e0579 Mon Sep 17 00:00:00 2001 From: hsutter Date: Wed, 2 Dec 2015 12:25:58 -0800 Subject: [PATCH] Fixed invoke() example to not forward the functor, to reflect other discussion --- CppCoreGuidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 91877fa..3ae7e85 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2347,8 +2347,8 @@ In that case, and only that case, make the parameter `TP&&` where `TP` is a temp ##### Example template - inline auto invoke(F&& f, Args&&... args) { - return forward(f)(forward(args)...); + inline auto invoke(F f, Args&&... args) { + return f(forward(args)...); }