Skip to content

Commit d029f04

Browse files
authored
Don't use __uuidof without GUID (#1180)
1 parent 9fc5cec commit d029f04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strings/base_meta.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ namespace winrt::impl
119119

120120
template <typename T>
121121
#if defined(__clang__)
122-
#if __has_declspec_attribute(uuid)
122+
#if __has_declspec_attribute(uuid) && defined(WINRT_IMPL_IUNKNOWN_DEFINED)
123123
inline const guid guid_v{ __uuidof(T) };
124124
#else
125125
inline constexpr guid guid_v{};
126126
#endif
127-
#elif defined(_MSC_VER)
127+
#elif defined(_MSC_VER) && defined(WINRT_IMPL_IUNKNOWN_DEFINED)
128128
inline constexpr guid guid_v{ __uuidof(T) };
129129
#else
130130
inline constexpr guid guid_v{};

0 commit comments

Comments
 (0)