• Advertisement
Sign in to follow this  

what does somefunc()=default mean?

This topic is 1916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

So I can only use default for copy, default constructor and assignment operator?

Destructor as well.

EDIT: he beat me! Edited by Saruman

Share this post


Link to post
Share on other sites
Typing has nothing to do with it. You want the code to be as clear as possible. Think of someone (a human) reading your code: If he's going to understand the code better if he is reminded that the compiler will write default implementations for certain functions, it is a good idea to remind him.

Share this post


Link to post
Share on other sites

Maybe it will be mystical and magical if I actually need that functionality


This is C++, remember. There are going to be subtle problems with it that will ruin everything else in the language :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement