What does "throw" do when used in a method declaration?
For example, here is a std::exception constructor:
Why is throw used here?Code:exception () throw();
What does "throw" do when used in a method declaration?
For example, here is a std::exception constructor:
Why is throw used here?Code:exception () throw();
It lets you specify which exceptions the member function will throw. In this case, the std::exception constructor is guaranteed not to throw any exceptions.
My best code is written with the delete key.