Permalink
Browse files

Add closure constructor from lvalues similar to std::tuple

  • Loading branch information...
jaredhoberock committed Apr 24, 2012
1 parent 65661eb commit c39592102a5da236ba5dbf789c7a1ce4214cc3e2
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/thread_group/detail/closure_cpp11.hpp
@@ -20,6 +20,11 @@ template<typename Function, typename... Args>
args(args...)
{}
+ closure(Function &&f, Args&&... args)
+ : f(std::forward<Function>(f)),
+ args(std::forward<Args>(args)...)
+ {}
+
void operator()()
{
apply_from_tuple(f, args);

0 comments on commit c395921

Please sign in to comment.