mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
11 lines
370 B
C++
11 lines
370 B
C++
#pragma once
|
|
#include <cstddef>
|
|
|
|
constexpr size_t KiB = 1024;
|
|
constexpr size_t MiB = 1024 * KiB;
|
|
constexpr size_t GiB = 1024 * MiB;
|
|
|
|
constexpr size_t operator"" _KiB(unsigned long long val) { return val * KiB; }
|
|
constexpr size_t operator"" _MiB(unsigned long long val) { return val * MiB; }
|
|
constexpr size_t operator"" _GiB(unsigned long long val) { return val * GiB; }
|