[webkit-reviews] review requested: [Bug 81061] Functions with C linkage should not return C++ classes : [Attachment 131758] the patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 13 17:28:06 PDT 2012


Filip Pizlo <fpizlo at apple.com> has asked  for review:
Bug 81061: Functions with C linkage should not return C++ classes
https://bugs.webkit.org/show_bug.cgi?id=81061

Attachment 131758: the patch
https://bugs.webkit.org/attachment.cgi?id=131758&action=review

------- Additional Comments from Filip Pizlo <fpizlo at apple.com>
Corrected the comment.

Apparently, the requirements for return types of functions with C linkage match
the C++-03 definition of POD (a strict subset of aggregate types - so no
C++-style members, only POD fields).  The C++-11 definition has been split up
into two separate concepts (trivial and standard-layout).  Prior to this code
we were returning standard-layout but not non-trivial (and thus not POD)
classes, which is correct in C++-11 but not C++-03.


More information about the webkit-reviews mailing list