This question already has an answer here:
- When Does Move Constructor get called? 2 answers
ist is possible to have a copy constructor implemented along with a move constructor? If I would have the following abstract class structure:
template<typename T>
class A
{
public:
A<T>();
A<T>(const& T);
A<T>(T&&);
// ...
}
- Is it possible to have both, copy - and move constructor
- How would a call of both of them look like? Is there a special syntax?
- How is the compiler differing between both calls?
Aucun commentaire:
Enregistrer un commentaire