Skip to content

Commit

Permalink
Merge pull request #28 from Romain-Geissler-1A/deprecated-copy-warning
Browse files Browse the repository at this point in the history
Fix gcc 9 deprecated copy warning.
  • Loading branch information
pdimov committed Aug 24, 2023
2 parents bf4b6a3 + 1d2c324 commit 5425a29
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/boost/accumulators/framework/accumulator_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ namespace detail
}

private:
accumulator_visitor &operator =(accumulator_visitor const &);
BOOST_DELETED_FUNCTION(accumulator_visitor &operator =(accumulator_visitor const &))
Args const &args;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace boost { namespace accumulators
}

private:
add_ref_visitor &operator =(add_ref_visitor const &);
BOOST_DELETED_FUNCTION(add_ref_visitor &operator =(add_ref_visitor const &))
Args const &args_;
};

Expand Down Expand Up @@ -87,7 +87,7 @@ namespace boost { namespace accumulators
}

private:
drop_visitor &operator =(drop_visitor const &);
BOOST_DELETED_FUNCTION(drop_visitor &operator =(drop_visitor const &))
Args const &args_;
};

Expand Down Expand Up @@ -227,7 +227,7 @@ namespace boost { namespace accumulators
}

private:
with_cached_result &operator =(with_cached_result const &);
BOOST_DELETED_FUNCTION(with_cached_result &operator =(with_cached_result const &))

void set(result_type const &r)
{
Expand Down
6 changes: 6 additions & 0 deletions include/boost/accumulators/framework/depends_on.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ namespace boost { namespace accumulators
{
}

accumulator_wrapper& operator=(accumulator_wrapper const &that)
{
*static_cast<Accumulator *>(this) = *static_cast<Accumulator const *>(&that);
return *this;
}

template<typename Args>
accumulator_wrapper(Args const &args)
: Accumulator(args)
Expand Down
4 changes: 2 additions & 2 deletions include/boost/accumulators/statistics/tail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace detail
}

private:
stat_assign_visitor &operator =(stat_assign_visitor const &);
BOOST_DELETED_FUNCTION(stat_assign_visitor &operator =(stat_assign_visitor const &))
Args const &args;
std::size_t index;
};
Expand Down Expand Up @@ -264,7 +264,7 @@ namespace impl
}

private:
indirect_cmp &operator =(indirect_cmp const &);
BOOST_DELETED_FUNCTION(indirect_cmp &operator =(indirect_cmp const &))
std::vector<Sample> const &samples;
};

Expand Down

0 comments on commit 5425a29

Please sign in to comment.