码迷,mamicode.com
首页 > 其他好文 > 详细

1.3

时间:2019-01-05 00:10:33      阅读:217      评论:0      收藏:0      [点我收藏+]

标签: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.

 

  

 

1.3

标签:member   cep   ali   eric   instant   c++   anti   pat   fun   

原文地址:https://www.cnblogs.com/lefthook/p/10223003.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!