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

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

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

相关推荐
可乐_不渴20 分钟前
【C++】 STL篇 哈希表实现
c++·哈希算法·散列表
风落青芜43 分钟前
C++入门:类和对象(二)
开发语言·数据结构·c++·算法
风落青芜2 小时前
C++入门:类和对象(三)
开发语言·数据结构·c++·算法
iou_q2 小时前
为什么C++中在构造函数中使用初始化列表更快?
c++
wuminyu3 小时前
OpenJDK学习笔记:Native线程如何回调Java
java·linux·c语言·jvm·c++
杜 硕4 小时前
从零开始的C++生活——第十五讲
开发语言·数据结构·c++·生活
纪念 2295 小时前
C++ 算法模板与错题 模拟(一)
android·c++·算法
随流寻影5 小时前
利用 C++ 实现二叉搜索树的增删查
开发语言·c++
学逆向的6 小时前
C++多态 汇编分析
开发语言·汇编·c++·网络安全
ShineWinsu6 小时前
对于Qt:QSound的解析
c++·qt·面试·音频·笔试·客户端·qsound