Core/SparsePtr: Use template type for +/- and +=/-=

This commit is contained in:
Jérôme Leclercq
2022-01-23 13:27:39 +01:00
parent bba5d7a803
commit 89e9e41357
3 changed files with 29 additions and 51 deletions

View File

@@ -34,13 +34,13 @@ SCENARIO("SparsePtr", "[CORE][SPARSEPTR]")
THEN("Operator+ and operator-")
{
auto offsetTwo = sparsePtr + 2ull;
auto offsetTwo = sparsePtr + 2;
CHECK(4 == *offsetTwo);
auto offsetZero = offsetTwo - 2ull;
auto offsetZero = offsetTwo - 2;
CHECK(0 == *offsetZero);
CHECK((offsetTwo - offsetZero) == 2ull);
CHECK((offsetTwo - offsetZero) == 2);
}
}
}