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 | |
Stephan Pleines | 5fc3507 | 2024-05-22 17:33:18 -0700 | [diff] [blame^] | 4 | #include <stddef.h> |
| 5 | |
James Kuszmaul | 65891e0 | 2023-11-06 13:09:07 -0800 | [diff] [blame] | 6 | #include <vector> |
| 7 | |
| 8 | #include "absl/container/inlined_vector.h" |
| 9 | |
| 10 | namespace aos { |
| 11 | |
| 12 | template <typename T, size_t N> |
| 13 | struct InlinedVector : public absl::InlinedVector<T, N> {}; |
| 14 | |
| 15 | // Specialized for the N == 0 case because absl::InlinedVector doesn't support |
| 16 | // it for some reason. |
| 17 | template <typename T> |
| 18 | struct InlinedVector<T, 0> : public std::vector<T> {}; |
| 19 | } // namespace aos |
| 20 | #endif // AOS_CONTAINERS_INLINED_VECTOR_H_ |