constexpr variable not captured

后端 未结 0 544
失恋的感觉
失恋的感觉 2020-12-10 06:05

The following code does not compile in clang (it does in GCC):

struct A{
    int a;
};

auto test(){
    constexpr A x{10};
    return []{
        return x;
          


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