Click here to Skip to main content
15,900,907 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalusing swap to make assignment operator exception safe Pin
George_George8-Jan-08 1:14
George_George8-Jan-08 1:14 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 2:03
mveCPallini8-Jan-08 2:03 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 2:24
George_George8-Jan-08 2:24 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 2:33
mveCPallini8-Jan-08 2:33 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 2:34
George_George8-Jan-08 2:34 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 3:14
mveCPallini8-Jan-08 3:14 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:18
George_George8-Jan-08 3:18 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 3:30
mveCPallini8-Jan-08 3:30 
George_George wrote:
This question is what I learned that swap could be used to design and implement an exception safe assignment operator.


Well, I think you learned about reading any book (or article). Please reference it, if you can.


George_George wrote:
I think you are well known about how to use swap to implement exception safe assignment opeator from your replies. Could you help to correct my code please?


In fact, no. I've grasped the main idea from your sample code, but I wasn't aware of that technique, hence I cannot try to fix the code simply guessing about (if it is a well established pattern, then we need a state-of-art example)

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:33
George_George8-Jan-08 3:33 
GeneralYou're welcome Pin
CPallini8-Jan-08 3:36
mveCPallini8-Jan-08 3:36 
GeneralRe: using swap to make assignment operator exception safe Pin
toxcct8-Jan-08 2:03
toxcct8-Jan-08 2:03 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 2:12
mveCPallini8-Jan-08 2:12 
GeneralRe: using swap to make assignment operator exception safe Pin
toxcct8-Jan-08 2:17
toxcct8-Jan-08 2:17 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 2:29
mveCPallini8-Jan-08 2:29 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:15
George_George8-Jan-08 3:15 
GeneralRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 3:21
mveCPallini8-Jan-08 3:21 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:27
George_George8-Jan-08 3:27 
GeneralRe: using swap to make assignment operator exception safe Pin
toxcct8-Jan-08 3:35
toxcct8-Jan-08 3:35 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:40
George_George8-Jan-08 3:40 
JokeRe: using swap to make assignment operator exception safe Pin
CPallini8-Jan-08 3:54
mveCPallini8-Jan-08 3:54 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:06
George_George8-Jan-08 3:06 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 3:16
George_George8-Jan-08 3:16 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 2:33
George_George8-Jan-08 2:33 
GeneralRe: using swap to make assignment operator exception safe Pin
George_George8-Jan-08 2:30
George_George8-Jan-08 2:30 
GeneralRe: using swap to make assignment operator exception safe Pin
toxcct8-Jan-08 2:37
toxcct8-Jan-08 2:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.