In this example code:
explicit MyClass(std::wstring text) noexcept;
Is the use of noexcept
here correct? wstring
can potentially throw on construction but does the throw happen before we are in the constructor or while we are in the constructor?
EDIT: Suppose this can be generalised to any function taking a by-value parameter.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…