Make this field a pointer instead of a reference, in order to make
`UniqueConstError` assignable. I don't really have a need for this, but
it seems more correct.
Change-Id: I29ae7a7380f75fa6b680116168a309e70c381f11
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12235
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
private:
explicit ConstErrorIterator(const UniqueConstError& error, const std::uint64_t index) noexcept :
- _mError {error}, _mIndex {index}
+ _mError {&error}, _mIndex {index}
{
}
}
private:
- const UniqueConstError& _mError;
+ const UniqueConstError *_mError;
std::uint64_t _mIndex;
};
inline ConstErrorCause ConstErrorIterator::operator*() const noexcept
{
- return _mError[_mIndex];
+ return (*_mError)[_mIndex];
}
inline UniqueConstError takeCurrentThreadError() noexcept