Y
Hacker News
new
|
ask
|
show
|
jobs
by
yngccc
4626 days ago
The girl forgot to mention exception safety on the class A slide, no hire.
4 comments
jmgao
4626 days ago
The constructor also wasn't tagged explicit.
link
kirab
4626 days ago
If B() is noexcept then A() is actually exception safe. The only thing which could happen would be bad_alloc but then v does not have to be deleted any more.
link
zvrba
4626 days ago
Right, like what happens with the memory allocated for px in situation like below, if new ClassY throws?
A::A() : px(new ClassX), py(new ClassY) { }
link
hamidr
4626 days ago
lol yeah But she is a C programmer you know ? ;)
link