We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d70e6bc + 4def812 commit 0c4e79fCopy full SHA for 0c4e79f
1 file changed
include/lefticus/tools/non_promoting_ints.hpp
@@ -179,7 +179,7 @@ template<std::integral Type> struct int_np
179
180
constexpr int_np &operator%=(const std::integral auto rhs) &noexcept
181
{
182
- value = static_cast<value_type>(value / rhs);
+ value = static_cast<value_type>(value % rhs);
183
return *this;
184
}
185
@@ -226,7 +226,7 @@ template<std::integral Type> struct int_np
226
227
constexpr int_np &operator%=(const int_np rhs) &noexcept
228
229
- value = static_cast<value_type>(value / rhs.value);
+ value = static_cast<value_type>(value % rhs.value);
230
231
232
0 commit comments