harttle / harttle.github.io

Harttle Land 的源码和文章
https://harttle.land
Creative Commons Attribution 4.0 International
122 stars 32 forks source link

2015/09/14/effective-cpp-46 #173

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Effective C++ 46:需要类型转换时,应当在类模板中定义非成员函数 | Harttle Land

如果所有参数都需要隐式类型转换,该函数应当声明为非成员函数。本文把这个观点推广到类模板和函数模板。但是在类模板中,需要所有参数隐式转换的函数应当声明为友元并定义在类模板中。

https://harttle.land/2015/09/14/effective-cpp-46.html

qianyanglm commented 1 year ago

非常好的笔记,很多内容书中写的拗口,还得看你写的,支持作者!!!