You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
static_assert(c - UFix<17,8>(1) == a, "test fail");
49
49
static_assert(c - SFix<13,9>(1) == a, "test fail");
50
50
static_assert(b + a - b == a, "test fail");
@@ -53,8 +53,8 @@ namespace FixMathPrivate {
53
53
#if __cplusplus >= 202002L
54
54
// These here involve shifts of negative numbers, which used to be "implementation defined" before C++-20.
55
55
// It doesn't cause a real-world problem, but the compiler won't accept it in a constexpr
56
-
static_assert(UFix<43,9>(0) - b - a == -(a+b));
57
-
static_assert(SFix<4, 3>(-1) == SFix<4, 5>(-1)); // NOTE This is a simpler test case for the above problem. Note the difference in NF, which prompts shifting
56
+
static_assert(UFix<43,9>(0) - b - a == -(a+b), "test fail");
57
+
static_assert(SFix<4, 3>(-1) == SFix<4, 5>(-1), "test fail"); // NOTE This is a simpler test case for the above problem. Note the difference in NF, which prompts shifting
58
58
#endif
59
59
// here's a variant that avoids the problem by using only positive numbers
60
60
static_assert(UFix<12,1>(999) - UFix<43,9>(0) - b - a == UFix<19,2>(999) + (-(a+b)), "test fail");
0 commit comments