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
---原始邮件---
发件人: ***@***.***>
发送时间: 2022年7月15日(周五) 晚上9:35
收件人: ***@***.***>;
抄送: ***@***.***>;
主题: Re: [parallel101/course] 第三节课、ppt第54页,用 [=] 来捕获传参的lambda表达式为什么占4个字节? (Issue #11)
这里应该并不涉及函数指针的问题,lambda表达式返回的是应该可以理解为一个重载了()操作符的匿名对象,这个对象中有一个n成员变量(值传递),所以这个对象占4个字节。
就好比自己随便创建一个类,这个类的大小只取决于类中所包含的成员,而与类的成员函数无关。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
按照我的理解是:
1:函数指针8个字节
2:带int变量fac,4个字节。应该是12个字节才对。
但是这个地方理解不清楚,还请彭哥帮忙解答一下
The text was updated successfully, but these errors were encountered: