From d029f0426e42db95148cbc0b22a2f0b567ff83d5 Mon Sep 17 00:00:00 2001 From: Raymond Chen Date: Thu, 8 Sep 2022 06:51:49 -0700 Subject: [PATCH] Don't use `__uuidof` without `GUID` (#1180) --- strings/base_meta.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strings/base_meta.h b/strings/base_meta.h index f951c4db..e80afb9b 100644 --- a/strings/base_meta.h +++ b/strings/base_meta.h @@ -119,12 +119,12 @@ namespace winrt::impl template #if defined(__clang__) -#if __has_declspec_attribute(uuid) +#if __has_declspec_attribute(uuid) && defined(WINRT_IMPL_IUNKNOWN_DEFINED) inline const guid guid_v{ __uuidof(T) }; #else inline constexpr guid guid_v{}; #endif -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(WINRT_IMPL_IUNKNOWN_DEFINED) inline constexpr guid guid_v{ __uuidof(T) }; #else inline constexpr guid guid_v{};