Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • This is almost certainly an MSVC bug (or a strict non-conformance) regarding the visibility of synthesised members in lambda closure types. Commented Feb 8 at 21:10
  • +l makes F a void(*)() instead of a class type so that could be what messes it up. I don't think it should though. Commented Feb 8 at 21:11
  • This is not a language rule and not related to calling conventions. It’s a MSVC implementation bug / limitation. According to the standard, a capture-less lambda’s closure type has a public, non-explicit, const conversion operator to a function pointer. That operator is a normal member conversion function, and member conversion functions are inherited like other non-static members. Commented Feb 8 at 21:56