Skip to content

Commit

Permalink
Merge pull request #26 from 5cript/fix/fix-gcc-build-issues
Browse files Browse the repository at this point in the history
Fixed build issue for gcc.
  • Loading branch information
5cript authored Jul 24, 2024
2 parents 50a0beb + 1020d5f commit e9dcca3
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions include/interval-tree/interval_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ namespace lib_interval_tree
friend lib_interval_tree::interval_tree_iterator <node <numerical_type, interval_type>, true>;
friend lib_interval_tree::interval_tree_iterator <node <numerical_type, interval_type>, false>;

template <typename T>
friend void increment(T& iter);
template <typename T>
friend void increment_reverse(T& iter);

public:
node(node* parent, interval_type interval)
: interval_{std::move(interval)}
Expand Down Expand Up @@ -432,8 +437,10 @@ namespace lib_interval_tree
const_interval_tree_iterator& operator=(const_interval_tree_iterator const&) = default;
const_interval_tree_iterator& operator=(const_interval_tree_iterator&&) noexcept = default;

friend void increment<const_interval_tree_iterator<node_type, reverse>>(const_interval_tree_iterator<node_type, reverse>& iter);
friend void increment_reverse<const_interval_tree_iterator<node_type, reverse>>(const_interval_tree_iterator<node_type, reverse>& iter);
template <typename T>
friend void increment(T& iter);
template <typename T>
friend void increment_reverse(T& iter);

const_interval_tree_iterator& operator++()
{
Expand Down Expand Up @@ -535,8 +542,10 @@ namespace lib_interval_tree
interval_tree_iterator& operator=(interval_tree_iterator const&) = default;
interval_tree_iterator& operator=(interval_tree_iterator&&) noexcept = default;

friend void increment<interval_tree_iterator<node_type, reverse>>(interval_tree_iterator<node_type, reverse>& iter);
friend void increment_reverse<interval_tree_iterator<node_type, reverse>>(interval_tree_iterator<node_type, reverse>& iter);
template <typename T>
friend void increment(T& iter);
template <typename T>
friend void increment_reverse(T& iter);

interval_tree_iterator& operator++()
{
Expand Down Expand Up @@ -702,6 +711,11 @@ namespace lib_interval_tree
friend interval_tree_iterator <node_type, true>;
friend interval_tree_iterator <node_type, false>;

template <typename T>
friend void increment(T& iter);
template <typename T>
friend void increment_reverse(T& iter);

public:
interval_tree()
: root_{nullptr}
Expand Down

0 comments on commit e9dcca3

Please sign in to comment.