|
-
June 24th, 2008, 04:10 PM
#1
[RESOLVED] Copy constructor vs copy assignment operator
Take the following code...
Code:
Base b1;
Base b2 = b1;
Is it merely a compiler optimization that causes the copy constructor to get called vice the copy assignment operator? Or, is this a hard and fast rule? Or, is it merely the tact that compiler writers have taken when such a construct is written? And, could this be different with different compilers?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|