Will an exception thrown from a noexcept function parameter's constructor immediately result in a call to std::terminate()?

Viewed 877

Given the following class declaration:

class phone_number
{
public:
    explicit phone_number( std::string number ) noexcept( std::is_nothrow_move_constructible< std::string >::value );
}

phone_number::phone_number( std::string number ) noexcept( std::is_nothrow_move_constructible< std::string >::value )
    : m_originalNumber{ std::move( number ) }
{

}

Will the following line of code end up calling std::terminate() immediately due to the noexcept specification if an exception is thrown from the string constructor?

const phone_number phone("(123) 456-7890");
2 Answers
Related