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

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

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

相关推荐
郝学胜-神的一滴15 小时前
C++20模板元编程 07:吃透名称绑定与编译期递归核心原理
c++·程序人生·vs·模板元
S_WEAN15 小时前
【C++】STL - Vector类的模拟实现
c++
wuminyu16 小时前
HotSpot的轻量锁与膨胀后的ObjectMonitor状态重建原理
java·linux·c语言·jvm·c++
一只小透明啊啊啊啊16 小时前
Socket、AIDL、SOME/IP
c++·mcu
Tim_1017 小时前
【LeetCode】338、比特位计数
c++·算法·leetcode
程序员AlbertTu18 小时前
# Mantissa 使用教程 — Python 版与 C++ 版
c++·python·数值运算
Lazionr18 小时前
多态:从多种形态到运行时绑定
开发语言·c++
别动我齐刘海18 小时前
ROS2 Jazzy + C++ 实战路线——ros2_control
c++·人工智能·python·opencv·机器学习·机器人·github
All for pursuit.19 小时前
【栈-4】739.每日温度
数据结构·c++·算法·leetcode
码匠许师傅19 小时前
【C++三方组件】glog:Google 出品的 C++ 日志库
c++