summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-14 01:41:04 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-14 01:41:04 +0000
commit1456372b7f52d49751535bc096d7590b10141f87 (patch)
tree0dbb15d06c29e0c2cd80ddde40d79987e5392e41 /tools
parent37936eefdf1bf98d1a4458d8f3b85233d28c37e4 (diff)
downloadchromium_src-1456372b7f52d49751535bc096d7590b10141f87.zip
chromium_src-1456372b7f52d49751535bc096d7590b10141f87.tar.gz
chromium_src-1456372b7f52d49751535bc096d7590b10141f87.tar.bz2
Provide necessary constructors in StackAllocator and PrivateHookAllocator to permit release mode building in VC++2008 SP1. The current allocators do not conform with the C++ spec for allocators, and unlike previous versions, VC++2008 requires conformant allocators.
The reason that the allocators are not conformant is that any allocator, say, template<typename T> struct Alloc; must have a constructor of the following form: template<typename U> Alloc(const Alloc<U>& other) to allow construction of an Alloc<T> from an Alloc<U>. The constructors cannot be explicit, because they're (essentially) copy constructors, and so are not called explicitly. StackAllocator has no converting copy constructor at all, and PrivateHookAllocator's is declared explicit, preventing it from being usable. Without the StackAllocator constructor, StackVectors fail (due to the std::vector member, base\stack_container.h(216)). Patch by Peter Bright <drpizza@quiscalusmexicanus.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/memory_watcher/memory_hook.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/memory_watcher/memory_hook.h b/tools/memory_watcher/memory_hook.h
index ffe07d3..131a38e 100644
--- a/tools/memory_watcher/memory_hook.h
+++ b/tools/memory_watcher/memory_hook.h
@@ -58,7 +58,7 @@ class PrivateHookAllocator {
struct rebind { typedef PrivateHookAllocator<U> other; };
template <class U>
- explicit PrivateHookAllocator(const PrivateHookAllocator<U>&) {}
+ PrivateHookAllocator(const PrivateHookAllocator<U>&) {}
};
// Classes which monitor memory from these hooks implement