fork download
#include
#include
using namespace std;
list& func();

int main(){
list& a = func();
delete &a;
std::cout<<"Here\n";
}

list& func(){
list* ptr = new list;
return *ptr;
}
Success #stdin #stdout 0.02s 2812KB
stdin
Standard input is empty
stdout
Here