Hello , what is used in specification in cpp
aravindjegan71:
Enda enaikkum Malayalam ariyum
Answers
Answered by
6
I hope you mark my answer as brainlist..☺️
C++ provides a mechanism to ensure that a given function is limited to throw only a specified list of exceptions. An exception specification at the beginning of any function acts as a guarantee to the function's caller that the function will throw only the exceptions contained in the exception specification.
For example, a function:
void translate() throw(unknown_word,bad_grammar) { /* ... */ }
explicitly states that it will only throw exception objects whose types are unknown_word or bad_grammar, or any type derived from unknown_word or bad_grammar.
Similar questions
English,
6 months ago
Accountancy,
6 months ago
Chemistry,
1 year ago
Physics,
1 year ago
English,
1 year ago