求解惑:这里符号&是什么意思?


Notification::Notification(const Notification& other)
{
    CALL_MEMBER_FN(&text, Set)(other.text.Get(), 0);
    CALL_MEMBER_FN(&status, Set)(other.status.Get(), 0);

    CALL_MEMBER_FN(&sound, Set)(other.sound.c_str());
    objectives.CopyFrom(&other.objectives);

    type = other.type;
    quest = other.quest;
    word = other.word;
    time = other.time;
}

const Notification&,这个&既不是取址也不是引用,不懂。

可以了解一下值传递、指针传递、引用传递,这里是引用传递,在调用Notification(const Notification& other)时,执行完该函数时,other的值按照函数里面的语句而发生改变。

可以参考这篇博客,C/C++中的值传递,引用传递,指针传递,指针引用传递:https://www.cnblogs.com/CheeseZH/p/5163280.html