[Webkit-unassigned] [Bug 58131] Fix compilation with Solaris 10/Sun Studio 12: moving elements in a vector requires source not to be const
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 8 11:41:30 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=58131
Alexey Proskuryakov <ap at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ap at webkit.org
--- Comment #2 from Alexey Proskuryakov <ap at webkit.org> 2011-04-08 11:41:30 PST ---
+ Fix compile issue on Solaris 10/Sun Studio 12, since the move is copying
+ the source and deleting it, formally the argument shouldn't be const anyway.
This is a questionable explanation. The ability to delete an object via a const pointer is a normal C++ behavior, and playing against C++ is not safe. Wouldn't it be better to do a const_cast when destructing as a workaround?
Besides, if src should be non-const, why doesn't the same apply to srcEnd?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list