Skip to content

Commit 0c4e79f

Browse files
authored
Merge pull request #15 from fvbommel/patch-1
Fix typos in operator%=
2 parents d70e6bc + 4def812 commit 0c4e79f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/lefticus/tools/non_promoting_ints.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ template<std::integral Type> struct int_np
179179

180180
constexpr int_np &operator%=(const std::integral auto rhs) &noexcept
181181
{
182-
value = static_cast<value_type>(value / rhs);
182+
value = static_cast<value_type>(value % rhs);
183183
return *this;
184184
}
185185

@@ -226,7 +226,7 @@ template<std::integral Type> struct int_np
226226

227227
constexpr int_np &operator%=(const int_np rhs) &noexcept
228228
{
229-
value = static_cast<value_type>(value / rhs.value);
229+
value = static_cast<value_type>(value % rhs.value);
230230
return *this;
231231
}
232232

0 commit comments

Comments
 (0)