Who manages the exception thrown by a copy constructor in parameters? [duplicate]
问题 This question already has an answer here : Constructor with by-value parameter & noexcept (1 answer) Closed 1 year ago . Assume I have this function void foo() noexcept { // Safely noexcept code. } And then this class: class Bar { Bar(const Bar&) { ... } // Is not noexcept, so might throw // Non movable: Bar(Bar&&) = delete; }; Now, I need to modify foo() to receive a Bar by value: void foo(Bar bar) // noexcept? { // Safely noexcept code } I assume the copy of Bar is done before the call to