We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79fc821 commit a7bbc67Copy full SHA for a7bbc67
1 file changed
include/experimental/__p1673_bits/proxy_reference.hpp
@@ -140,11 +140,7 @@ class proxy_reference : proxy_reference_base {
140
P1673_PROXY_REFERENCE_ARITHMETIC_OPERATOR( / )
141
142
friend auto abs(const derived_type& x) {
143
- if constexpr (std::is_unsigned_v<value_type>) {
144
- return value_type(static_cast<const this_type&>(x));
145
- } else {
146
- return std::abs(value_type(static_cast<const this_type&>(x)));
147
- }
+ return impl::abs_if_needed(value_type(static_cast<const this_type&>(x)));
148
}
149
150
friend auto real(const derived_type& x) {
0 commit comments