summaryrefslogtreecommitdiffstats
path: root/libcxx/include/__bit_reference
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2019-12-12 20:48:11 -0500
committerEric Fiselier <eric@efcs.ca>2019-12-12 21:09:08 -0500
commitf97936fabd263e3b311e3b8e9ffca4920e4fcff0 (patch)
tree2c9de3065660c9a37f8e963b2380a19d3ca0d8b9 /libcxx/include/__bit_reference
parenta8154e5e0c83d2f0f65f3b4fb1a0bc68785bd975 (diff)
downloadbcm5719-llvm-f97936fabd263e3b311e3b8e9ffca4920e4fcff0.tar.gz
bcm5719-llvm-f97936fabd263e3b311e3b8e9ffca4920e4fcff0.zip
[libc++] Cleanup and enable multiple warnings.
Too many warnings are being disabled too quickly. Warnings are important to keeping libc++ correct. This patch re-enables two warnings: -Wconstant-evaluated and -Wdeprecated-copy. In future, all warnings disabled for the test suite should require an attached bug. The bug should state the plan for re-enabling that warning, or a strong case why it should remain disabled.
Diffstat (limited to 'libcxx/include/__bit_reference')
-rw-r--r--libcxx/include/__bit_reference6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference
index bbc15983424..3d4da1cbb68 100644
--- a/libcxx/include/__bit_reference
+++ b/libcxx/include/__bit_reference
@@ -1114,8 +1114,12 @@ public:
#endif
{}
+ // avoid re-declaring a copy constructor for the non-const version.
+ using __type_for_copy_to_const =
+ _If<_IsConst, __bit_iterator<_Cp, false>, struct __private_nat>;
+
_LIBCPP_INLINE_VISIBILITY
- __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
+ __bit_iterator(const __type_for_copy_to_const& __it) _NOEXCEPT
: __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
_LIBCPP_INLINE_VISIBILITY reference operator*() const _NOEXCEPT
OpenPOWER on IntegriCloud