summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster.h
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-15 14:14:22 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-15 14:14:22 +0000
commit3e3986e24a847ac5341708827b33b5e76a83037a (patch)
tree8943aa9fa5ccff0a407ba9f262de5c979cec380d /net/base/cookie_monster.h
parent0b8de2362cc5e42f523907c96598f36325e9c6a5 (diff)
downloadchromium_src-3e3986e24a847ac5341708827b33b5e76a83037a.zip
chromium_src-3e3986e24a847ac5341708827b33b5e76a83037a.tar.gz
chromium_src-3e3986e24a847ac5341708827b33b5e76a83037a.tar.bz2
An early optimization in std::pair<> in Visual Studio 2008 Service Pack 1 makes it requires a default constructor on its members.
Review URL: http://codereview.chromium.org/2851 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2212 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster.h')
-rw-r--r--net/base/cookie_monster.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index eeac69f..83f5a2b 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -249,6 +249,15 @@ class CookieMonster::CanonicalCookie {
httponly_(httponly) {
}
+#if defined(_MSC_VER) && _CPPLIB_VER == 505
+ // On Visual Studio 2008 Service Pack 1, std::vector<> do an early
+ // optimization in a way that requires the availability of a default
+ // constructor. It is because it sees std::pair<> as "swappable", so creates a
+ // dummy to swap with, which requires an empty constructor for any entry in
+ // the std::pair.
+ CanonicalCookie() { }
+#endif
+
// Supports the default copy constructor.
const std::string& Name() const { return name_; }