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++
compiler synthesized constructors/copy constructors/assignment operators
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="Craig Scott, post: 2918831"] I understand that if I define a constructor, then the compiler won't It's a bit more complicated than that. If you write any of your own constructors, the compiler will not generate a default constructor for you (see 12.1/5). Also, if you have a template constructor taking a single parameter, I believe that the compiler will still generate an implicit copy constructor even if the template version would otherwise be able to take the same parameter as the copy constructor. Anyone able to provide evidence for or against this in the standard? The closest I can find is 14.5.2/2, but that is talking about which one is called when a template and non-template member function are both present with the same name, not constructors specifically. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
compiler synthesized constructors/copy constructors/assignment operators
Top