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

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

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

相关推荐
SilentSlot29 分钟前
【C/C++】手写 DPDK 协议栈(十二):TCP 并发与自实现 epoll 的就绪事件分发
c语言·c++·tcp/ip
SilentSlot37 分钟前
【C/C++】手写 DPDK 协议栈(六):TCP 三次握手、状态机与数据回显
c语言·c++·tcp/ip
乱七八糟的屋子40 分钟前
AMQP C++ 超详细实战教程(amqp-cpp 开源库从零入门到生产落地)
c++·rabbitmq·任务队列·amqp·流量削峰·c++服务端异步解耦·分布式消息通信
Escalating_xu1 小时前
C++11 彻底吃透 emplace_back 与 push_back(最全闭环:左右值|深浅拷贝|移动构造|万能引用|完美转发)
开发语言·c++
啦啦啦啦啦zzzz1 小时前
oat++框架应用之do、dao、service
服务器·c++·mysql·oatpp
皓月斯语1 小时前
B3865 [GESP202309 二级] 小杨的 X 字矩阵 题解
开发语言·c++·矩阵·题解
paeamecium3 小时前
【PAT甲级真题】- Rational Sum (20)
数据结构·c++·python·算法·pat考试·pat
王维同学11 小时前
Winsock 协议与名称空间 Provider 目录
网络·c++·windows·安全
拳里剑气13 小时前
C++算法:BFS解决FloodFill算法
c++·算法·bfs·宽度优先
爱写代码的小朋友13 小时前
从零开始学 Win32 API:C++ 窗口编程实战(VS Code + MinGW-w64 命令行详解)
开发语言·c++