string operation and related exception
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,
|All times are GMT. The time now is 10:12 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.