Language
Compiler
Options
$
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Bar()
START
Signal:
Aborted
Author
anonymous
over 7 years ago
Author
anonymous
over 7 years ago
$
prog.cc: In constructor 'Bar::Bar()':
prog.cc:16:9: warning: 'Bar::foo' is initialized with itself [-Winit-self]
Bar(): foo(foo) { std::cout << "Bar()\n"; }
^~~
prog.cc: In constructor 'Bar::Bar()':
prog.cc:16:20: warning: '*<unknown>.Bar::foo' is used uninitialized in this function [-Wuninitialized]
Bar(): foo(foo) { std::cout << "Bar()\n"; }
^~~
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Bar()
START