online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <future> using namespace std; template <typename F> void foo(F&& f) { std::packaged_task<typename std::invoke_result<F>::type()> pt(std::forward<F>(f)); } int main() { auto f = [](){}; foo(f); auto u = std::make_unique<int>(42); foo([u = std::move(u)]() {}); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue