why does friend declaration on a lambda does not work on gcc

后端 未结 0 1559
执念已碎
执念已碎 2021-01-06 06:25

See this simple example,

constexpr auto f = [](const auto& foo){
    foo.fun2();
};

struct Foo{
    friend decltype(f);

    void fun1() const{
        f         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题