c++: use noexcept where appropriate