Sign in to follow this  
lride

what does somefunc()=default mean?

Recommended Posts

Saruman    4339
[quote name='lride' timestamp='1350861026' post='4992611']
So I can only use default for copy, default constructor and assignment operator?
[/quote]
Destructor as well.

EDIT: he beat me! Edited by Saruman

Share this post


Link to post
Share on other sites
alvaro    21246
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
InvalidPointer    1842
[quote name='SiCrane' timestamp='1350868125' post='4992641']
Maybe it will be mystical and magical if I actually need that functionality
[/quote]

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this