|
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 |
@@ -549,13 +549,12 @@ struct radix_tree<Key, Value, BytesView>::node { |
549 | 549 | end() const; |
550 | 550 |
|
551 | 551 | template <bool Direction = direction::Forward, typename Ptr> |
552 | | - auto find_child(const Ptr &n) const -> decltype(begin<Direction>()); |
| 552 | + iterator<Direction> find_child(const Ptr &n) const; |
553 | 553 |
|
554 | 554 | template <bool Direction = direction::Forward, |
555 | 555 | typename Enable = typename std::enable_if< |
556 | 556 | Direction == direction::Forward>::type> |
557 | | - auto make_iterator(const tagged_node_ptr *ptr) const |
558 | | - -> decltype(begin<Direction>()); |
| 557 | + iterator<Direction> make_iterator(const tagged_node_ptr *ptr) const; |
559 | 558 |
|
560 | 559 | uint8_t padding[256 - sizeof(parent) - sizeof(leaf) - sizeof(child) - |
561 | 560 | sizeof(byte) - sizeof(bit)]; |
@@ -2720,18 +2719,17 @@ radix_tree<Key, Value, BytesView>::node::end() const |
2720 | 2719 |
|
2721 | 2720 | template <typename Key, typename Value, typename BytesView> |
2722 | 2721 | template <bool Direction, typename Ptr> |
2723 | | -auto |
| 2722 | +typename radix_tree<Key, Value, BytesView>::node::template iterator<Direction> |
2724 | 2723 | radix_tree<Key, Value, BytesView>::node::find_child(const Ptr &n) const |
2725 | | - -> decltype(begin<Direction>()) |
2726 | 2724 | { |
2727 | 2725 | return std::find(begin<Direction>(), end<Direction>(), n); |
2728 | 2726 | } |
2729 | 2727 |
|
2730 | 2728 | template <typename Key, typename Value, typename BytesView> |
2731 | 2729 | template <bool Direction, typename Enable> |
2732 | | -auto |
| 2730 | +typename radix_tree<Key, Value, BytesView>::node::template iterator<Direction> |
2733 | 2731 | radix_tree<Key, Value, BytesView>::node::make_iterator( |
2734 | | - const tagged_node_ptr *ptr) const -> decltype(begin<Direction>()) |
| 2732 | + const tagged_node_ptr *ptr) const |
2735 | 2733 | { |
2736 | 2734 | return forward_iterator(ptr, this); |
2737 | 2735 | } |
|
0 commit comments