|
1 | 1 | // SPDX-License-Identifier: BSD-3-Clause
|
2 |
| -/* Copyright 2020, Intel Corporation */ |
| 2 | +/* Copyright 2020-2022, Intel Corporation */ |
3 | 3 |
|
4 | 4 | /**
|
5 | 5 | * @file
|
@@ -545,13 +545,12 @@ struct radix_tree<Key, Value, BytesView>::node {
|
545 | 545 | end() const;
|
546 | 546 |
|
547 | 547 | template <bool Direction = direction::Forward, typename Ptr>
|
548 |
| - auto find_child(const Ptr &n) const -> decltype(begin<Direction>()); |
| 548 | + iterator<Direction> find_child(const Ptr &n) const; |
549 | 549 |
|
550 | 550 | template <bool Direction = direction::Forward,
|
551 | 551 | typename Enable = typename std::enable_if<
|
552 | 552 | Direction == direction::Forward>::type>
|
553 |
| - auto make_iterator(const tagged_node_ptr *ptr) const |
554 |
| - -> decltype(begin<Direction>()); |
| 553 | + iterator<Direction> make_iterator(const tagged_node_ptr *ptr) const; |
555 | 554 |
|
556 | 555 | uint8_t padding[256 - sizeof(parent) - sizeof(leaf) - sizeof(child) -
|
557 | 556 | sizeof(byte) - sizeof(bit)];
|
@@ -2713,18 +2712,17 @@ radix_tree<Key, Value, BytesView>::node::end() const
|
2713 | 2712 |
|
2714 | 2713 | template <typename Key, typename Value, typename BytesView>
|
2715 | 2714 | template <bool Direction, typename Ptr>
|
2716 |
| -auto |
| 2715 | +typename radix_tree<Key, Value, BytesView>::node::template iterator<Direction> |
2717 | 2716 | radix_tree<Key, Value, BytesView>::node::find_child(const Ptr &n) const
|
2718 |
| - -> decltype(begin<Direction>()) |
2719 | 2717 | {
|
2720 | 2718 | return std::find(begin<Direction>(), end<Direction>(), n);
|
2721 | 2719 | }
|
2722 | 2720 |
|
2723 | 2721 | template <typename Key, typename Value, typename BytesView>
|
2724 | 2722 | template <bool Direction, typename Enable>
|
2725 |
| -auto |
| 2723 | +typename radix_tree<Key, Value, BytesView>::node::template iterator<Direction> |
2726 | 2724 | radix_tree<Key, Value, BytesView>::node::make_iterator(
|
2727 |
| - const tagged_node_ptr *ptr) const -> decltype(begin<Direction>()) |
| 2725 | + const tagged_node_ptr *ptr) const |
2728 | 2726 | {
|
2729 | 2727 | return forward_iterator(ptr, this);
|
2730 | 2728 | }
|
|
0 commit comments