[Yunq] Add support for repeated nested fields

This commit is contained in:
Drew Galbraith 2024-01-11 22:09:42 -08:00
parent 05f2403dc2
commit 9c860dd6a4
14 changed files with 207 additions and 61 deletions

View file

@ -47,6 +47,7 @@ class Vector {
template <typename... Args>
void EmplaceBack(Args&&... args);
T& PeekBack();
T&& PopBack();
typedef ArrayIterator<T> Iterator;
@ -130,6 +131,11 @@ void Vector<T>::EmplaceBack(Args&&... args) {
data_[size_++] = T(args...);
}
template <typename T>
T& Vector<T>::PeekBack() {
return data_[size_ - 1];
}
template <typename T>
T&& Vector<T>::PopBack() {
size_--;