5 ms·
The girl forgot to mention exception safety on the class A slide, no hire.
by yngccc 13y ago
The girl forgot to mention exception safety on the class A slide, no hire.
- hamidr 13y agolol yeah But she is a C programmer you know ? ;)
- jmgao 13y agoThe constructor also wasn't tagged explicit.
- deleted 13y ago[deleted]
- kirab 13y agoIf 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.
- zvrba 13y agoRight, 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) { }