string operation and related exception

Joined
Feb 12, 2008
Messages
108
Reaction score
0
Hello everyone,


I made some self-study of the possible exception from string operations. I want to let you review whether I am correct. Since I can not find any exception information from MSDN. Talking in Visual Studio STL environment is ok.

1. assignment, may throw bad_alloc?
2. comparison (compare), nothrow?
3. insert, may throw bad_alloc?
4. concatenation, may throw bad_alloc?
5. replace, may throw bad_alloc (suppose replace small sub-string to large sub-string)?
6. find (e.g. find_first_of), nothrow?
7. substr, may throw bad_alloc (sub-string is something new)?


thanks in advance,
George
 

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
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top