Skip to content

Instantly share code, notes, and snippets.

@cppio
Created February 15, 2019 03:14
Show Gist options
  • Save cppio/fb53c5c4ceb1a636acc29ed4677ba222 to your computer and use it in GitHub Desktop.
Save cppio/fb53c5c4ceb1a636acc29ed4677ba222 to your computer and use it in GitHub Desktop.
An example of C++ perfect forwarding
#include <utility>
template<typename F, typename... Args>
decltype(auto) call(F&& f, Args&&... args) { return f(std::forward<Args>(args)...); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment