Skip to content

Commit a99d026

Browse files
committed
Reflections: remove some VS2015 support code
This cleans up the workaround for VS2015 which hasn't been needed for quite some time now as the minimum requirements was VS2017. We are now looking to move to VS2019 as a minimum compiler version on Windows, and so clean this up. Fixes: SR-3422
1 parent 3ec0413 commit a99d026

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

include/swift/Reflection/TypeRef.h

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,13 @@ enum class TypeRefKind {
3838
#undef TYPEREF
3939
};
4040

41-
// MSVC reports an error if we use "template"
42-
// Clang reports an error if we don't use "template"
43-
#if defined(__clang__) || defined(__GNUC__)
44-
# define DEPENDENT_TEMPLATE template
45-
#else
46-
# define DEPENDENT_TEMPLATE
47-
#endif
48-
4941
#define FIND_OR_CREATE_TYPEREF(Allocator, TypeRefTy, ...) \
5042
auto ID = Profile(__VA_ARGS__); \
51-
const auto Entry = Allocator.TypeRefTy##s.find(ID); \
52-
if (Entry != Allocator.TypeRefTy##s.end()) \
43+
const auto Entry = Allocator.TypeRefTy##s.find(ID); \
44+
if (Entry != Allocator.TypeRefTy##s.end()) \
5345
return Entry->second; \
54-
const auto TR = \
55-
Allocator.DEPENDENT_TEMPLATE makeTypeRef<TypeRefTy>(__VA_ARGS__); \
56-
Allocator.TypeRefTy##s.insert({ID, TR}); \
46+
const auto TR = Allocator.template makeTypeRef<TypeRefTy>(__VA_ARGS__); \
47+
Allocator.TypeRefTy##s.insert({ID, TR}); \
5748
return TR;
5849

5950
/// An identifier containing the unique bit pattern made up of all of the

0 commit comments

Comments
 (0)