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

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

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

相关推荐
赴生-几秒前
C++进阶 智能指针
开发语言·c++
AI thought5 分钟前
C语言、C++与C#深度研究报告:从底层控制到现代企业级开发的演进
c语言·c++·c·内存管理·编译模型
我命由我123457 分钟前
RFID 技术极简理解
java·c语言·c++·嵌入式硬件·物联网·visualstudio·java-ee
格发许可优化管理系统15 分钟前
Mentor许可证与其他软件许可证的深度比较
java·大数据·运维·c语言·c++·算法
吃着火锅x唱着歌19 分钟前
深度探索C++对象模型 学习笔记 第六章 执行期语意学(1)
c++·笔记·学习
xxwl58535 分钟前
工作室小测的部分记录
c++·学习·算法
程序员zgh38 分钟前
C++ 万能引用与完美转发
c语言·开发语言·c++·经验分享·学习
智者知已应修善业39 分钟前
【51单片机串口通信甲机四个按键模拟四位二进制值发送乙机以十进制显示2位数码管】2024-6-14
c++·经验分享·笔记·算法·51单片机
郝学胜_神的一滴1 小时前
CMake 018:解决头文件编译失效\&VS项目无法展示头文件难题
c++·cmake
影视飓风TIM1 小时前
C++ 核心语法进阶:【类和对象终章】从对象拷贝到友元与优化(补上期重载)
c++