fork(3) download
#include <functional>
#include <iostream>
int main()
{
    std::function<int(int)> f = [](int x) { return x; };
    std::function<const int&(const int& x)> g = f;
    std::cout << g( 42 ) << std::endl;
}
Runtime error #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty