[webkit-reviews] review granted: [Bug 59261] Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield : [Attachment 90814] unaryplus.diff

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 26 15:38:12 PDT 2011


Anders Carlsson <andersca at apple.com> has granted Xan Lopez
<xan.lopez at gmail.com>'s request for review:
Bug 59261: Compile error with GCC 4.6.0, tries to assign unsigned& to bitfield
https://bugs.webkit.org/show_bug.cgi?id=59261

Attachment 90814: unaryplus.diff
https://bugs.webkit.org/attachment.cgi?id=90814&action=review

------- Additional Comments from Anders Carlsson <andersca at apple.com>
The patch looks correct, but I'd prefer a more generic comment; you'll get this
error with any compiler whose standard library has an std::make_pair
implementation that takes value references. How about something like:

// Newer versions of the STL have an std::make_pair function that takes rvalue
references.
// When either of the parameters are bitfields, the C++ compiler will try to
bind them as lvalues, which is invalid. To work around this, use unary "+" to
make the parameter an rvalue.
// See https://bugs.webkit.org/show_bug.cgi?id=59261 for more details.


More information about the webkit-reviews mailing list