小编SyC*_*DeR的帖子

有人能解释一下这个初始化代码吗?

谁能解释一下“ self_( this, []( ... ) {} )”是如何工作的?

struct Parent {
    std::shared_ptr<Parent> self_;
    Parent() : self_( this, []( ... ) {} ) {}
    operator std::shared_ptr<Parent>() const { return self_; }
}
Run Code Online (Sandbox Code Playgroud)

c++ lambda this initializer

0
推荐指数
1
解决办法
136
查看次数

标签 统计

c++ ×1

initializer ×1

lambda ×1

this ×1