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

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

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

相关推荐
持梦远方7 分钟前
C 语言基础入门:基本数据类型与运算符详解
c语言·开发语言·c++
江理不变情42 分钟前
图像质量对比感悟
c++·人工智能
apocelipes2 小时前
记一次ADL导致的C++代码编译错误
c++·开发工具和环境
Code Warrior3 小时前
【每日算法】专题五_位运算
开发语言·c++
OneQ6667 小时前
C++讲解---创建日期类
开发语言·c++·算法
Coding小公仔9 小时前
C++ bitset 模板类
开发语言·c++
菜鸟看点10 小时前
自定义Cereal XML输出容器节点
c++·qt
悲伤小伞11 小时前
linux_git的使用
linux·c语言·c++·git
ysa05103011 小时前
数论基础知识和模板
数据结构·c++·笔记·算法
小小小小王王王14 小时前
求猪肉价格最大值
数据结构·c++·算法