| 350 | } |
| 351 | template <bool Flattened, typename T> |
| 352 | static auto DoGetAll(const T& root, const FieldRef& ref, MemoryPool* pool = nullptr) { |
| 353 | if constexpr (Flattened) { |
| 354 | return ref.GetAllFlattened(root, pool); |
| 355 | } else { |
| 356 | return ToResult(ref.GetAll(root)); |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | template <typename I, bool Flattened = false> |
| 361 | void TestGet() const { |