在扣除“auto”之前使用“static constexpr auto A::f()”

Mar*_*ddu 6 c++

此代码将无法编译:

struct A{
    static constexpr auto f(){
        return []{};
    }
    static constexpr auto x = f();
};
Run Code Online (Sandbox Code Playgroud)

错误:在扣除“auto”之前使用“static constexpr auto A::f()”

我知道有多个与此类似的问题,但我真的不明白在这种特定情况下是什么阻止了编译器完成其工作。另请注意,在类定义之外的相同代码可以完美运行。