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

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

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

相关推荐
WBluuue1 小时前
数据结构与算法:dp优化——优化尝试和状态设计
c++·算法·leetcode·动态规划
睡不醒的kun2 小时前
定长滑动窗口-基础篇(2)
数据结构·c++·算法·leetcode·职场和发展·滑动窗口·定长滑动窗口
小王努力学编程2 小时前
LangChain——AI应用开发框架(核心组件1)
linux·服务器·前端·数据库·c++·人工智能·langchain
txzrxz2 小时前
单调栈详解(含题目)
数据结构·c++·算法·前缀和·单调栈
Trouvaille ~3 小时前
【Linux】进程间通信(二):命名管道与进程池架构实战
linux·c++·chrome·架构·进程间通信·命名管道·进程池
HellowAmy3 小时前
我的C++规范 - 随机时间点
开发语言·c++·代码规范
啊阿狸不会拉杆4 小时前
《计算机操作系统》第七章 - 文件管理
开发语言·c++·算法·计算机组成原理·os·计算机操作系统
lixinnnn.4 小时前
字符串拼接:Cities and States S
开发语言·c++·算法
csdn_aspnet4 小时前
C++常用算法深度解析:从STL到现代C++的算法艺术
c++
kk”5 小时前
C++智能指针
开发语言·c++