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

This commit is contained in:
Mateusz Pusz committed 2019-10-01 16:29:42 +02:00
1 parent 56679498b7
commit 12200f6f40
3 files changed
+22 -7

No files matched your search

+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