c ++ 17:内部类默认成员初始化程序在堆栈内联变量中被忽略

Compiling it using clang -std=c++17, and the error msg is default member initializer for '_x' needed within definition of enclosing class 'A' outside of member functions. I tried it with gcc, and got the same error msg.


#include <iostream>

class A {
struct B {
  size_t _x = 0;
    static inline B b = {};

int main(void) {
  return 0;