James Kuszmaul | 65891e0 | 2023-11-06 13:09:07 -0800 | [diff] [blame^] | 1 | #ifndef AOS_CONTAINERS_INLINED_VECTOR_H_ |
| 2 | #define AOS_CONTAINERS_INLINED_VECTOR_H_ |
| 3 | |
| 4 | #include <vector> |
| 5 | |
| 6 | #include "absl/container/inlined_vector.h" |
| 7 | |
| 8 | namespace aos { |
| 9 | |
| 10 | template <typename T, size_t N> |
| 11 | struct InlinedVector : public absl::InlinedVector<T, N> {}; |
| 12 | |
| 13 | // Specialized for the N == 0 case because absl::InlinedVector doesn't support |
| 14 | // it for some reason. |
| 15 | template <typename T> |
| 16 | struct InlinedVector<T, 0> : public std::vector<T> {}; |
| 17 | } // namespace aos |
| 18 | #endif // AOS_CONTAINERS_INLINED_VECTOR_H_ |