Fix template copy constructor in zone_allocator
authordanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 19 Feb 2014 16:35:19 +0000 (16:35 +0000)
committerdanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 19 Feb 2014 16:35:19 +0000 (16:35 +0000)
R=rossberg@chromium.org

Review URL: https://codereview.chromium.org/165943005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/zone-allocator.h

index 312d395c8379af143dcaafd530d3c9b58a6e657f..7ed17139041f44614a28275409480baf541a503c 100644 (file)
@@ -50,7 +50,9 @@ class zone_allocator {
   explicit zone_allocator(Zone* zone) throw() : zone_(zone) {}
   explicit zone_allocator(const zone_allocator& other) throw()
       : zone_(other.zone_) {}
-  template<typename U> zone_allocator(const zone_allocator<U>&) throw() {}
+  template<typename U> zone_allocator(const zone_allocator<U>& other) throw()
+      : zone_(other.zone_) {}
+  template<typename U> friend class zone_allocator;
 
   pointer address(reference x) const {return &x;}
   const_pointer address(const_reference x) const {return &x;}
@@ -79,6 +81,7 @@ class zone_allocator {
   }
 
  private:
+  zone_allocator();
   Zone* zone_;
 };