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

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

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中加了些东西。

相关推荐
aaPIXa62226 分钟前
C++ TensorRT Edge-LLM 边缘推理框架:从原理到实战
开发语言·c++·edge
nianniannnn2 小时前
c++复习自存--标准模板库STL
开发语言·c++·windows
努力努力再努力wz2 小时前
【高性能网络库与HTTP Server系列】:基于主从 Reactor 模型实现高性能 C++ 网络库与 HTTP Server
开发语言·网络·数据结构·数据库·c++·网络协议·http
Robot_Nav3 小时前
C++ 面试常问问题汇总:基础语法、面向对象、STL、多线程与设计模式
c++·设计模式·面试
盐焗鹌鹑蛋3 小时前
【C++】二叉搜索树
c++
哎呦,帅小伙哦3 小时前
C++工程实战: 预处理宏、宏重定义避坑、LOG_TAG业务实践与__COUNTER__深度解析
c++
IVVi0jToe3 小时前
高效C++线程池设计与实现
java·c++·安全
^yi4 小时前
【C++】内存管理
开发语言·c++
云栖梦泽4 小时前
从 IMX415 摄像头驱动理解 Media Controller 框架
linux·开发语言·c++·嵌入式硬件
C++ 老炮儿的技术栈4 小时前
MFC 自定义纯色居中文字进度条控件
c语言·数据库·c++·windows·算法·c·visual studio