1.3

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.

 

  

 

posted @ 2019-01-04 23:20  lefthook  阅读(289)  评论(0编辑  收藏  举报