Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Unified Diff: src/zone-allocator.h

Issue 165943005: Fix template copy constructor in zone_allocator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone-allocator.h
diff --git a/src/zone-allocator.h b/src/zone-allocator.h
index 5245c6b1bfd45d3d23e5e5efb82a5b4fa4707fba..0ede5e041cdb1a73dd3f37f2440d0f1540a24904 100644
--- a/src/zone-allocator.h
+++ b/src/zone-allocator.h
@@ -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;}
@@ -72,6 +74,7 @@ class zone_allocator {
void destroy(pointer p) { (static_cast<T*>(p))->~T(); }
private:
+ zone_allocator();
Zone* zone_;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698