From 4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Wed, 23 Jun 2021 14:18:27 -0700 Subject: common: Replace common_sizes into user-literals Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals. --- src/tests/common/host_memory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/tests/common/host_memory.cpp') diff --git a/src/tests/common/host_memory.cpp b/src/tests/common/host_memory.cpp index e241f8be5..2dc7b5d5e 100644 --- a/src/tests/common/host_memory.cpp +++ b/src/tests/common/host_memory.cpp @@ -5,11 +5,13 @@ #include #include "common/host_memory.h" +#include "common/literals.h" using Common::HostMemory; +using namespace Common::Literals; static constexpr size_t VIRTUAL_SIZE = 1ULL << 39; -static constexpr size_t BACKING_SIZE = 4ULL * 1024 * 1024 * 1024; +static constexpr size_t BACKING_SIZE = 4_GiB; TEST_CASE("HostMemory: Initialize and deinitialize", "[common]") { { HostMemory mem(BACKING_SIZE, VIRTUAL_SIZE); } -- cgit v1.2.3