feat: unit_constants
This commit is contained in:
1 parent
0fb821a392
commit
8dede0db9f
70 files changed
+1000
-28
No files matched your search
@@ -22,6 +22,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <units/bits/one_rep.h>
|
||||
#include <units/base_dimension.h>
|
||||
#include <units/data/prefixes.h>
|
||||
#include <units/unit.h>
|
||||
@@ -71,4 +72,22 @@ constexpr auto operator"" _q_PiB(unsigned long long l) { return information<pebi
|
||||
|
||||
} // namespace literals
|
||||
|
||||
namespace unit_constants {
|
||||
|
||||
inline constexpr auto b = information<bit, detail::one_rep>{};
|
||||
inline constexpr auto Kib = information<kibibit, detail::one_rep>{};
|
||||
inline constexpr auto Mib = information<mebibit, detail::one_rep>{};
|
||||
inline constexpr auto Gib = information<gibibit, detail::one_rep>{};
|
||||
inline constexpr auto Tib = information<tebibit, detail::one_rep>{};
|
||||
inline constexpr auto Pib = information<pebibit, detail::one_rep>{};
|
||||
|
||||
inline constexpr auto B = information<byte, detail::one_rep>{};
|
||||
inline constexpr auto KiB = information<kibibyte, detail::one_rep>{};
|
||||
inline constexpr auto MiB = information<mebibyte, detail::one_rep>{};
|
||||
inline constexpr auto GiB = information<gibibyte, detail::one_rep>{};
|
||||
inline constexpr auto TiB = information<tebibyte, detail::one_rep>{};
|
||||
inline constexpr auto PiB = information<pebibyte, detail::one_rep>{};
|
||||
|
||||
} // namespace unit_constants
|
||||
|
||||
} // namespace units::data
|
||||
Reference in new issue
Block a user