2

为什么 C++17 结构化绑定不喜欢this->运算符 in 是这样的语法:

std::tuple<int, std:string> external_function()
{
    return { 0, "" };
}

class Foo
{
public:
    void internal_method()
    {
        auto [this->x, unused] = external_function();
    }

private:
    int x;
};

如何在返回的变量名中添加类成员说明符?

4

0 回答 0