You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mystruct中m_obj = lazy([]{return std::make_shared<Big>(); });在gcc与msvc下均无法通过编译
gcc报错信息 cannot bind non-const lvalue reference of type 'Mystruct::Mystruct()::<lambda()>&' to an rvalue of type 'Mystruct::Mystruct()::<lambda()>'
将其改为 auto temp=[]{return std::make_shared<Big>(); }; m_obj = lazy(temp);
后可以通过编译
The text was updated successfully, but these errors were encountered:
Mystruct中
m_obj = lazy([]{return std::make_shared<Big>(); });
在gcc与msvc下均无法通过编译gcc报错信息
cannot bind non-const lvalue reference of type 'Mystruct::Mystruct()::<lambda()>&' to an rvalue of type 'Mystruct::Mystruct()::<lambda()>'
将其改为
auto temp=[]{return std::make_shared<Big>(); };
m_obj = lazy(temp);
后可以通过编译
The text was updated successfully, but these errors were encountered: