summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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_; }