fix: Multiple definitions of literals

This commit is contained in:
WerWolv 2021-09-06 23:08:02 +02:00
parent 680587e050
commit d7707bae62
1 changed files with 4 additions and 4 deletions

View File

@ -4,19 +4,19 @@ namespace hex::literals {
/* Byte literals */
unsigned long long operator ""_Bytes(unsigned long long bytes) {
constexpr static inline unsigned long long operator ""_Bytes(unsigned long long bytes) noexcept {
return bytes;
}
unsigned long long operator ""_kiB(unsigned long long kiB) {
constexpr static inline unsigned long long operator ""_kiB(unsigned long long kiB) noexcept {
return operator ""_Bytes(kiB * 1024);
}
unsigned long long operator ""_MiB(unsigned long long MiB) {
constexpr static inline unsigned long long operator ""_MiB(unsigned long long MiB) noexcept {
return operator ""_kiB(MiB * 1024);
}
unsigned long long operator ""_GiB(unsigned long long GiB) {
constexpr static inline unsigned long long operator ""_GiB(unsigned long long GiB) noexcept {
return operator ""_MiB(GiB * 1024);
}