Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Visual Studio 2015 Community
- problem with lambdas when capturing variadic vars from lambda
- */
- template <typename ... Args>
- void foo(Args&& ... args)
- {
- auto fn = [&args...](){
- auto fn2 = [&args...](){ // error C3493: 'args' cannot be implicitly captured because no default capture mode has been specified
- std::cout << "hello world" << std::endl;
- };
- fn2();
- };
- fn();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement