标签:member cep ali eric instant c++ anti pat fun
Effective C++ Scott Meyers
Chapter 7. Templates and Generic Programming
1. Item 45: Use member function templates to accept "all compatible types".
Constructors like this - ones that create one object from another object whose type is a different instantiation of the same template - are sometimes known as generalized copy constructors.
Use member function templates to generate functions that accept all compatible types.
If you declare member templates for generalized copy construction or generalized assignment, you‘ll still need to declare the normal copy constructor and copy assignment operator, too.
VM Live Migration At Scale --- Google Inc.
标签:member cep ali eric instant c++ anti pat fun
原文地址:https://www.cnblogs.com/lefthook/p/10223003.html