Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions include/boost/histogram/indexed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class BOOST_ATTRIBUTE_NODISCARD indexed_range {
with the algorithms of the standard library, the accessor is implicitly convertible to
a cell value. Assignments and comparisons are passed through to the cell. An accessor
is coupled to its parent indexed_range::iterator. Moving the parent iterator
forward also updates the linked accessor. Accessors are not copyable. They cannot be
stored in containers, but indexed_range::iterator can be stored.
forward also updates the linked accessor. Accessors are movable but not copyable.
They cannot be stored in containers, but indexed_range::iterator can be stored.
*/
class BOOST_ATTRIBUTE_NODISCARD accessor : detail::mirrored<accessor, void> {
public:
Expand Down Expand Up @@ -218,6 +218,9 @@ class BOOST_ATTRIBUTE_NODISCARD indexed_range {

operator value_type() const noexcept { return get(); }

// libc++ 21 std::generate binds the dereferenced iterator to a by-value parameter
accessor(accessor&&) = default;

private:
accessor(iterator& i) noexcept : iter_(i) {}

Expand Down
Loading