c++ - difference between copy constructors? -


i reading c++ primer , piece of code confuses me little. maybe have read before forgotten about.

this code has 2 copy constructors dont know difference between them

class quote { public:     quote() = default;     quote(const quote&) = default;    // <<== 1     quote(quote&&) = default;         // <<== , 1     quote& operator=(const quote&) = default;     quote& operator=(quote&&) = default;     virtual ~quote() = default; } 

what difference in general?

and double "&" mean?

they not both copy constructors, first one: quote(const quote&) = default;. second 1 move constructor, reading on move semantics , c++11.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -