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

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

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

相关推荐
qq_4663024539 分钟前
vs2008 Hotlink实时数据读取
c++·qt
阿达King哥1 小时前
关于C++中的typedef typename的含义
c++
咔咔咔的3 小时前
3652. 按策略买卖股票的最佳时机
c++
欧特克_Glodon4 小时前
基于Qt+VTK实现的CT/MR影像浏览工具,支持体渲染及体模型剪裁
c++·qt·vtk·体渲染·裁剪
似水এ᭄往昔6 小时前
【C++】--封装红⿊树实现mymap和myset
开发语言·数据结构·c++·算法·stl
charlie1145141916 小时前
嵌入式现代C++教程:C++98——从C向C++的演化(3)
c语言·开发语言·c++·笔记·学习·嵌入式
moonquakeTT6 小时前
C++:深拷贝与浅拷贝
c++
程序员zgh6 小时前
C语言 指针用法与区别(指针常量、常量指针、指针函数、函数指针、二级指针)
c语言·开发语言·jvm·c++
冉佳驹6 小时前
C++ ——— 仿函数的使用、继承方式、赋值转换规则、菱形继承与虚继承
c++·继承·virtual·仿函数·菱形继承·模板特化·虚继承
咔咔咔的7 小时前
955. 删列造序 II
c++