Commit d806fef1 authored by titzer@chromium.org's avatar titzer@chromium.org

Fix >> versus > > for stupid C++ compilers.

R=vogelheim@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23454 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7fb56e2e
...@@ -17,36 +17,37 @@ namespace internal { ...@@ -17,36 +17,37 @@ namespace internal {
// A wrapper subclass for std::vector to make it easy to construct one // A wrapper subclass for std::vector to make it easy to construct one
// that uses a zone allocator. // that uses a zone allocator.
template <typename T> template <typename T>
class ZoneVector : public std::vector<T, zone_allocator<T>> { class ZoneVector : public std::vector<T, zone_allocator<T> > {
public: public:
// Constructs an empty vector. // Constructs an empty vector.
explicit ZoneVector(Zone* zone) explicit ZoneVector(Zone* zone)
: std::vector<T, zone_allocator<T>>(zone_allocator<T>(zone)) {} : std::vector<T, zone_allocator<T> >(zone_allocator<T>(zone)) {}
// Constructs a new vector and fills it with {size} elements, each // Constructs a new vector and fills it with {size} elements, each
// having the value {def}. // having the value {def}.
ZoneVector(int size, T def, Zone* zone) ZoneVector(int size, T def, Zone* zone)
: std::vector<T, zone_allocator<T>>(size, def, zone_allocator<T>(zone)) {} : std::vector<T, zone_allocator<T> >(size, def, zone_allocator<T>(zone)) {
}
}; };
// A wrapper subclass std::deque to make it easy to construct one // A wrapper subclass std::deque to make it easy to construct one
// that uses a zone allocator. // that uses a zone allocator.
template <typename T> template <typename T>
class ZoneDeque : public std::deque<T, zone_allocator<T>> { class ZoneDeque : public std::deque<T, zone_allocator<T> > {
public: public:
explicit ZoneDeque(Zone* zone) explicit ZoneDeque(Zone* zone)
: std::deque<T, zone_allocator<T>>(zone_allocator<T>(zone)) {} : std::deque<T, zone_allocator<T> >(zone_allocator<T>(zone)) {}
}; };
// A wrapper subclass for std::queue to make it easy to construct one // A wrapper subclass for std::queue to make it easy to construct one
// that uses a zone allocator. // that uses a zone allocator.
template <typename T> template <typename T>
class ZoneQueue : public std::queue<T, std::deque<T, zone_allocator<T>>> { class ZoneQueue : public std::queue<T, std::deque<T, zone_allocator<T> > > {
public: public:
// Constructs an empty queue. // Constructs an empty queue.
explicit ZoneQueue(Zone* zone) explicit ZoneQueue(Zone* zone)
: std::queue<T, std::deque<T, zone_allocator<T>>>( : std::queue<T, std::deque<T, zone_allocator<T> > >(
std::deque<T, zone_allocator<T>>(zone_allocator<T>(zone))) {} std::deque<T, zone_allocator<T> >(zone_allocator<T>(zone))) {}
}; };
// Typedefs to shorten commonly used vectors. // Typedefs to shorten commonly used vectors.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment