| 622 | /// recursively init all extendible structures, and construct fields |
| 623 | template <typename Derived_t> |
| 624 | uintptr_t |
| 625 | initRecurseSuper(Derived_t &derived, uintptr_t tail_ptr /*= 0*/) |
| 626 | { |
| 627 | // track a tail pointer, that starts after the class, and iterate each extendible block |
| 628 | if constexpr (has_super_type<Derived_t>::value) { |
| 629 | // init super type, move tail pointer |
| 630 | tail_ptr = initRecurseSuper<typename Derived_t::super_type>(derived, tail_ptr); |
| 631 | } |
| 632 | if constexpr (std::is_base_of<Extendible<Derived_t>, Derived_t>::value) { |
| 633 | // set start for this extendible block after the previous extendible, and move tail pointer to after this block |
| 634 | tail_ptr = derived.Extendible<Derived_t>::initFields(tail_ptr); |
| 635 | } |
| 636 | return tail_ptr; |
| 637 | } |
| 638 | |
| 639 | } // namespace details |
| 640 | |