operator% constrained to integral types only (resolves #16)

This commit is contained in:
Mateusz Pusz
2019-10-01 16:29:42 +02:00
parent 56679498b7
commit 12200f6f40
3 changed files with 22 additions and 7 deletions
+7
View File
@@ -187,6 +187,13 @@ namespace {
static_assert((2m /= 2).count() == 1);
static_assert((7m %= 2).count() == 1);
static_assert((7m %= 2m).count() == 1);
// static_assert((7.m %= 2.).count() == 1); // should not compile
// static_assert((7.m %= 2).count() == 1); // should not compile
// static_assert((7m %= 2.).count() == 1); // should not compile
static_assert((7m %= 2m).count() == 1);
// static_assert((7.m %= 2.m).count() == 1); // should not compile
// static_assert((7.m %= 2m).count() == 1); // should not compile
// static_assert((7m %= 2.m).count() == 1); // should not compile
// non-member arithmetic operators