memgraph/memory/literals.hpp
2015-10-08 00:58:29 +02:00

30 lines
463 B
C++

#ifndef MEMGRAPH_MEMORY_LITERALS_HPP
#define MEMGRAPH_MEMORY_LITERALS_HPP
#include <cstdint>
namespace memory
{
namespace literals
{
constexpr unsigned long long operator"" _GB(unsigned long long gb)
{
return 1024 * 1024 * 1024 * gb;
}
constexpr unsigned long long operator"" _MB(unsigned long long mb)
{
return 1024 * 1024 * mb;
}
constexpr unsigned long long operator"" _kB(unsigned long long kb)
{
return 1024 * kb;
}
}
}
#endif