Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
conditions for automatic generation of default ctor, copy ctor,and default assignment operator (oper
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Andrey Tarasevich, post: 3524480"] By "explicit" here you probably mean "user-declared". The term "explicit" has a certain specific meaning when applied to constructors in C++, you know... Again, a problem with terminology. There's no such thing as "default copy constructor". There's the default constructor. And there's the copy constructor. Both can be ether user-declared or compiler-declared. I assume your question is about the compiler-declared copy constructor. Providing a user-declared default constructor will not really "cause" anything to happen to compiler-declared copy constructor, i.e. it will not prevent the compiler from declaring the copy constructor in situations when you don't declare it yourself. Yes. Regardless of what other assignment operators you might declare, if you don't declare the copy assignment operator, the compiler will declare one for you. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
conditions for automatic generation of default ctor, copy ctor,and default assignment operator (oper
Top