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

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

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

相关推荐
刚入坑的新人编程12 分钟前
C++智能指针(详细解答)
开发语言·c++
用户6869161349020 小时前
哈希表实现指南:从原理到C++实践
数据结构·c++
大老板a21 小时前
c++五分钟搞定异步处理
c++
羑悻的小杀马特1 天前
从信息孤岛到智能星云:学习助手编织高校学习生活的全维度互联网络
c++·学习·生活·api
C++ 老炮儿的技术栈1 天前
VSCode -配置为中文界面
大数据·c语言·c++·ide·vscode·算法·编辑器
祁同伟.1 天前
【C++】类和对象(上)
c++
90wunch1 天前
更进一步深入的研究ObRegisterCallBack
c++·windows·安全
刃神太酷啦1 天前
聚焦 string:C++ 文本处理的核心利器--《Hello C++ Wrold!》(10)--(C/C++)
java·c语言·c++·qt·算法·leetcode·github
DARLING Zero two♡1 天前
C++数据的输入输出秘境:IO流
c++·stl·io流
知然2 天前
鸿蒙 Native API 的封装库 h2lib_arkbinder
c++·arkts·鸿蒙