List();
List( List const & );
List( List && );
Please tell me the difference between these three constructors (specially last two)? actually i'm confused between List & and List && ? what is the difference between & and &&
List();
List( List const & );
List( List && );
Please tell me the difference between these three constructors (specially last two)? actually i'm confused between List & and List && ? what is the difference between & and &&
Coming top-to-bottom:
List();
Copy constructor (where const &
means it takes const lvalue reference):
List( List const & );
Move constructor (where &&
means it takes non-const rvalue reference):
List( List && );