Stop throwing C++ exceptions

D

dover

Is std::nothrow only used with new? Under what other situations
"std::nothrow" can be used to stop throwing C++ exceptions? (Please give
some examples if this is so.)

Many thanks!
 
P

Peter Koch Larsen

dover said:
Is std::nothrow only used with new? Under what other situations
"std::nothrow" can be used to stop throwing C++ exceptions? (Please give
some examples if this is so.)

Many thanks!

std::nothrow_t is simply a type added to a function giving it another
signature. You can use it yourself whenever you feel the need.
I bellieve the standard only uses it in the new operator.


/Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,172
Messages
2,570,934
Members
47,474
Latest member
AntoniaDea

Latest Threads

Top