exception-safe
Is it OK to have a throwing swap member-implementation?
The general guideline when writing classes (using the copy-and-swap idiom) is to provide a non throwing swap member function. (Effective C++, 3rd edition, Item 25 and other resources)[详细]
2023-04-11 02:36 分类:问答Is Try/Finally actually exception-safe?
Let\'s say you have a piece of code like: resource = allocateResource(); try { /* dangerous code here*/ }[详细]
2023-03-10 03:24 分类:问答Exception Safety- When, How, Why?
I\'m just a fledgling programmer that at least tries to program more than the best-case scenario. I\'ve been reading Herb Sutter\'s \"Exceptional C++\" and went through the exception-safety chapters t[详细]
2023-01-31 02:57 分类:问答Why does `myvector.push_back(autoPtr.release())` provide the strong exception safety guarantee?
EDIT: I should\'ve mentioned, I was looking at the documentation for Boost\'s ptr_sequence_adapter and it claims that their adapter for template< class U > void push_back( ::std::auto_ptr<U&g[详细]
2023-01-10 11:44 分类:问答Can a stack have an exception safe method for returning and removing the top element with move semantics?
In an answer to a question about std::stack::pop() I claimed that the reason pop does not return the value is for exception safety reason (what happens if the copy constructor throws).[详细]
2022-12-26 05:41 分类:问答《自勉时步步生光 (Live)》MP3歌词-陈粒 / 杨众国?
自勉时步步生光 (Live) 陈粒/ 杨众国 专辑:这!就是原创 第八期 语种:国语 发行时间:2019-04-27[详细]
2022-12-16 22:10 分类:问答