[Yunq] Add support for repeated nested fields
This commit is contained in:
parent
05f2403dc2
commit
9c860dd6a4
14 changed files with 207 additions and 61 deletions
|
|
@ -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_--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue