From d7707bae62e21b3f058077c7040214d5df5c765e Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 6 Sep 2021 23:08:02 +0200 Subject: [PATCH] fix: Multiple definitions of literals --- plugins/libimhex/include/hex/helpers/literals.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/libimhex/include/hex/helpers/literals.hpp b/plugins/libimhex/include/hex/helpers/literals.hpp index 6bd3fc701..6d1e5908d 100644 --- a/plugins/libimhex/include/hex/helpers/literals.hpp +++ b/plugins/libimhex/include/hex/helpers/literals.hpp @@ -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); }