OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 }; | 616 }; |
617 | 617 |
618 template <typename T, size_t inlineCapacity = 0, typename Allocator = DefaultAll
ocator> // Heap-allocated vectors with no inlineCapacity never need a destructor
. | 618 template <typename T, size_t inlineCapacity = 0, typename Allocator = DefaultAll
ocator> // Heap-allocated vectors with no inlineCapacity never need a destructor
. |
619 class Vector : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, public Condi
tionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, (INLINE_CAPACITY == 0) &
& Allocator::isGarbageCollected> { | 619 class Vector : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, public Condi
tionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, (INLINE_CAPACITY == 0) &
& Allocator::isGarbageCollected> { |
620 WTF_USE_ALLOCATOR(Vector, Allocator); | 620 WTF_USE_ALLOCATOR(Vector, Allocator); |
621 typedef VectorBuffer<T, INLINE_CAPACITY, Allocator> Base; | 621 typedef VectorBuffer<T, INLINE_CAPACITY, Allocator> Base; |
622 typedef VectorTypeOperations<T> TypeOperations; | 622 typedef VectorTypeOperations<T> TypeOperations; |
623 | 623 |
624 public: | 624 public: |
625 typedef T ValueType; | 625 typedef T ValueType; |
| 626 typedef T value_type; |
626 | 627 |
627 typedef T* iterator; | 628 typedef T* iterator; |
628 typedef const T* const_iterator; | 629 typedef const T* const_iterator; |
629 typedef std::reverse_iterator<iterator> reverse_iterator; | 630 typedef std::reverse_iterator<iterator> reverse_iterator; |
630 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; | 631 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; |
631 | 632 |
632 Vector() | 633 Vector() |
633 { | 634 { |
634 static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializ
eWithMemset, "Cannot initialize with memset if there is a vtable"); | 635 static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializ
eWithMemset, "Cannot initialize with memset if there is a vtable"); |
635 #if ENABLE(OILPAN) | 636 #if ENABLE(OILPAN) |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 struct NeedsTracing<Vector<T, N>> { | 1342 struct NeedsTracing<Vector<T, N>> { |
1342 static const bool value = false; | 1343 static const bool value = false; |
1343 }; | 1344 }; |
1344 #endif | 1345 #endif |
1345 | 1346 |
1346 } // namespace WTF | 1347 } // namespace WTF |
1347 | 1348 |
1348 using WTF::Vector; | 1349 using WTF::Vector; |
1349 | 1350 |
1350 #endif // WTF_Vector_h | 1351 #endif // WTF_Vector_h |
OLD | NEW |