[Webkit-unassigned] [Bug 10765] Windows build busted due to std::copy usage in Vector.h
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Sun Sep 10 08:23:10 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=10765
opendarwin.org at bdash.net.nz changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |opendarwin.org at bdash.net.nz
------- Comment #8 from opendarwin.org at bdash.net.nz 2006-09-10 08:23 PDT -------
After a bit of reading I have discovered that the warning is due to to
Microsoft's "Safe Standard C++ Library"
(http://msdn2.microsoft.com/en-US/library/ms404581.aspx), in particular the
explicit use of "Checked Iterators"
(http://msdn2.microsoft.com/en-US/library/y9ww7c1a.aspx) which involves the use
of unchecked iterators emitting a compiler warning about deprecation.
I'm not convinced that we should work around Microsofts deprecation of a
standard library function by changes in the code. Their "Checked Iterators"
page (http://msdn2.microsoft.com/en-US/library/y9ww7c1a.aspx) two preprocessor
constants that can be used to control the use of checked iterators. Defining
_SECURE_SCL_NO_DEPRECATE will disable the compile-time warnings that checked
iterators can emit, and defining _SECURE_SCL to 0 will disable the use of
checked iterators entirely.
With regards to Karthik's comment -- further discussion on IRC concluded that
the body of operator= could be changed to:
if (&other == this)
return *this;
clear();
reserveCapacity(other.size());
TypeOperations::uninitializedCopy(other.begin(), other.end(), begin());
m_size = other.size();
return *this;
to retains the existing semantics while removing the call to std::copy. It
does change the performance characteristics somewhat in the case that size() >
other.size() || other.size() < capacity(), but I'm not sure as to what extent.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list