This is a function from < mutex > (MSVSC)
Part of conditional_variable:
void notify_one() noexcept { // wake up one waiter
_Check_C_return(_Cnd_signal(_Mycnd()));
}
It's marked as noexcept, but _Check_C_return can throw(from < xthreads.h >):
inline int _Check_C_return(int _Res) { // throw exception on failure
if (_Res != _Thrd_success) {
_Throw_C_error(_Res);
}
return _Res;
}
So, I've got 2 questions:
- Why is it marked as noexcept?
- If it throws in my program, is it my fault?