This allows us to turn -Wdeprecated-copy back on, which a recent Clang
commit broke when the warning became more stringent.
Details
Details
- Reviewers
xbolva00 ldionne - Group Reviewers
Restricted Project - Commits
- rG70d94c3f2cae: [libc++] __bit_iterator mustn't rely on deprecated SMF generation.
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
You probably saw my Slack, but for the record, I think we want this:
public:
_LIBCPP_INLINE_VISIBILITY __bit_iterator() _NOEXCEPT
#if _LIBCPP_STD_VER > 11
: __seg_(nullptr), __ctz_(0)
#endif
{}
// When _IsConst=false, this is the copy constructor.
// It is non-trivial. We maintain this for ABI purposes.
_LIBCPP_INLINE_VISIBILITY
__bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
: __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
// When _IsConst=false, we have a user-provided copy constructor,
// so we must also provide a copy assignment operator because
// the implicit generation of a defaulted one is deprecated.
_LIBCPP_INLINE_VISIBILITY
__bit_iterator& operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
__seg_ = __it.__seg_;
__ctz_ = __it.__ctz_;
return *this;
}
_LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT
{return reference(__seg_, __storage_type(1) << __ctz_);}Comment Actions
Previous (failing) buildkite run is in https://buildkite.com/llvm-project/libcxx-ci/builds/2759 . I'm about to update this PR with my suggested patch.
Comment Actions
Apply my suggested patch instead. Let's see what buildkite thinks of this. (I think it'll pass, but let's see.)
| libcxx/include/__bit_reference | ||
|---|---|---|
| 1118 | Maybe mention the obvious:
| |
Maybe mention the obvious: