首页 > 编程语言 > 详细

c++ CPO ADL

时间:2021-08-24 16:45:20      阅读:10      评论:0      收藏:0      [点我收藏+]

(1)A CPO is a callable function object, which means you can easily pass it around to other functions without having to worry about the struggle that is passing around other kinds of polymorphic callables (like function templates and overload sets).

(2)ADL (C++参数依赖查找) ADL:它的规则就是当编译器对 无限定域的函数 调用进行名字查找时,除了当前名字空间域以外,也会把 函数参数类型所处的名字空间 加入查找的范围。. 什么是无限定域的函数?. function (args); // 无限定域 namespace ::function (args);

c++ CPO ADL

原文:https://www.cnblogs.com/fogwizard/p/15180328.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!