Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 59f4271

Browse files
Merge pull request #1235 from igchor/fix_gcc12_compilation
Fix compliation on gcc 12
2 parents 8647212 + 8eb1a2f commit 59f4271

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

include/libpmemobj++/experimental/radix_tree.hpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: BSD-3-Clause
2-
/* Copyright 2020, Intel Corporation */
2+
/* Copyright 2020-2022, Intel Corporation */
33

44
/**
55
* @file
@@ -545,13 +545,12 @@ struct radix_tree<Key, Value, BytesView>::node {
545545
end() const;
546546

547547
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;
549549

550550
template <bool Direction = direction::Forward,
551551
typename Enable = typename std::enable_if<
552552
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;
555554

556555
uint8_t padding[256 - sizeof(parent) - sizeof(leaf) - sizeof(child) -
557556
sizeof(byte) - sizeof(bit)];
@@ -2713,18 +2712,17 @@ radix_tree<Key, Value, BytesView>::node::end() const
27132712

27142713
template <typename Key, typename Value, typename BytesView>
27152714
template <bool Direction, typename Ptr>
2716-
auto
2715+
typename radix_tree<Key, Value, BytesView>::node::template iterator<Direction>
27172716
radix_tree<Key, Value, BytesView>::node::find_child(const Ptr &n) const
2718-
-> decltype(begin<Direction>())
27192717
{
27202718
return std::find(begin<Direction>(), end<Direction>(), n);
27212719
}
27222720

27232721
template <typename Key, typename Value, typename BytesView>
27242722
template <bool Direction, typename Enable>
2725-
auto
2723+
typename radix_tree<Key, Value, BytesView>::node::template iterator<Direction>
27262724
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
27282726
{
27292727
return forward_iterator(ptr, this);
27302728
}

0 commit comments

Comments
 (0)