函数参数里的&怎么判断是引用还是取地址的研究

刚开始。不熟。函数参数里的&怎么判断是引用还是取地址。

int b; void a(int &p); void a(int* p);

a(b); a(&b);先这样理解。

void a (T&&) maybe rvalue reference of equal qualifier, void a(int &) maybe lvalue reference. not sure

OHOS ERROR\] In file included from .../.../foundation/multimodalinput/input/frameworks/proxy/events/src/axis_event.cpp:16: \[OHOS ERROR\] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/axis_event.h:21: \[OHOS ERROR\] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/input_event.h:28: \[OHOS ERROR\] .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/pointer_event.h:34:29: error: unknown class name 'InputEvent'; did you mean 'RawInputEvent'? \[OHOS ERROR\] class PointerEvent : public InputEvent { \[OHOS ERROR\] \^\~\~\~\~\~\~\~\~\~ \[OHOS ERROR\] RawInputEvent \[OHOS ERROR\] .../.../foundation/multimodalinput/input/util/common/include/struct_multimodal.h:426:8: note: 'RawInputEvent' declared here \[OHOS ERROR\] struct RawInputEvent { \[OHOS ERROR\] \^ \[OHOS ERROR\] In file included from .../.../foundation/multimodalinput/input/frameworks/proxy/events/src/axis_event.cpp:16: \[OHOS ERROR\] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/axis_event.h:21: \[OHOS ERROR\] In file included from .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/input_event.h:28: \[OHOS ERROR\] .../.../foundation/multimodalinput/input/interfaces/native/innerkits/event/include/pointer_event.h:688:63: error: unknown type name 'InputEvent'; did you mean 'RawInputEvent'? \[OHOS ERROR\] static std::shared_ptr from(std::shared_ptr inputEvent); \[OHOS ERROR\] \^\~\~\~\~\~\~\~\~\~ \[OHOS ERROR\] RawInputEvent 怎么回事?这是在inputevent.h中加了些东西。

相关推荐
敲代码的瓦龙14 分钟前
C++?继承!!!
c语言·开发语言·c++·windows·后端·算法
恒者走天下1 小时前
让学习回归到技术上来(技术 !=== 死记硬背)
c++
linux开发之路1 小时前
【备战秋招】C++音视频开发经典面试题整理
c++·ffmpeg·音视频·rtmp·音视频编解码
小吴同学·2 小时前
OPC Client第5讲(wxwidgets):初始界面的事件处理;按照配置文件初始化界面的内容
c++·wxwidgets
虾球xz4 小时前
游戏引擎学习第314天:将精灵拆分成多个层
linux·c++·学习·游戏引擎
会开花的二叉树4 小时前
vector的实现
数据结构·c++·算法·stl
序属秋秋秋4 小时前
《数据结构初阶》【番外篇:快速排序的前世今生】
c语言·数据结构·c++·笔记·leetcode·排序算法
CodeWithMe4 小时前
【C/C++】红黑树学习笔记
c语言·c++·学习
天赐细莲4 小时前
(C++17) 未捕获异常 uncaught_exceptions
开发语言·c++
Despacito0o6 小时前
C++面向对象编程实战:继承与派生全解析
开发语言·c++