From 2b770125c35f061e0da813dab91f42c96b1ac749 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 28 Feb 2026 07:27:27 +0100 Subject: chore: wip: including TProc and Boost for Nectar compiler frontend. Signed-off-by: Amlal El Mahrouss --- include/CompilerKit/UUID.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'include/CompilerKit/UUID.h') diff --git a/include/CompilerKit/UUID.h b/include/CompilerKit/UUID.h index 2993b8b..02f95dc 100644 --- a/include/CompilerKit/UUID.h +++ b/include/CompilerKit/UUID.h @@ -261,14 +261,14 @@ namespace Detail { size_t m_byteCount; }; - template - inline constexpr CharT empty_guid[37] = "00000000-0000-0000-0000-000000000000"; + template + inline constexpr Char empty_guid[37] = "00000000-0000-0000-0000-000000000000"; template <> inline constexpr wchar_t empty_guid[37] = L"00000000-0000-0000-0000-000000000000"; - template - inline constexpr CharT guid_encoder[17] = "0123456789abcdef"; + template + inline constexpr Char guid_encoder[17] = "0123456789abcdef"; template <> inline constexpr wchar_t guid_encoder[17] = L"0123456789abcdef"; @@ -349,9 +349,9 @@ enum class uuid_version { // Forward declare uuid & to_string so that we can declare to_string as a friend // later. class uuid; -template , - class Allocator = std::allocator> -std::basic_string to_string(uuid const& id); +template , + class Allocator = std::allocator> +std::basic_string to_string(uuid const& id); // -------------------------------------------------------------------------------------------------------------------------- // uuid class @@ -498,8 +498,8 @@ class uuid { friend std::basic_ostream& operator<<(std::basic_ostream& s, uuid const& id); - template - friend std::basic_string to_string(uuid const& id); + template + friend std::basic_string to_string(uuid const& id); friend std::hash; }; @@ -520,16 +520,16 @@ class uuid { return lhs.data < rhs.data; } -template -[[nodiscard]] inline std::basic_string to_string(uuid const& id) { - std::basic_string uustr{Detail::empty_guid}; +template +[[nodiscard]] inline std::basic_string to_string(uuid const& id) { + std::basic_string uustr{Detail::empty_guid}; for (size_t i = 0, index = 0; i < 36; ++i) { if (i == 8 || i == 13 || i == 18 || i == 23) { continue; } - uustr[i] = Detail::guid_encoder[id.data[index] >> 4 & 0x0f]; - uustr[++i] = Detail::guid_encoder[id.data[index] & 0x0f]; + uustr[i] = Detail::guid_encoder[id.data[index] >> 4 & 0x0f]; + uustr[++i] = Detail::guid_encoder[id.data[index] & 0x0f]; index++; } @@ -679,11 +679,11 @@ class uuid_name_generator { hasher.process_bytes(bytes, 16); } - template - void process_characters(std::basic_string_view const str) { + template + void process_characters(std::basic_string_view const str) { for (uint32_t c : str) { hasher.process_byte(static_cast(c & 0xFF)); - if constexpr (!std::is_same_v) { + if constexpr (!std::is_same_v) { hasher.process_byte(static_cast((c >> 8) & 0xFF)); hasher.process_byte(static_cast((c >> 16) & 0xFF)); hasher.process_byte(static_cast((c >> 24) & 0xFF)); -- cgit v1.2.3