Skip to content

Commit 6b36b87

Browse files
authored
Merge pull request #40627 from compnerd/SR-3422
Reflections: remove some VS2015 support code
2 parents 4b83b3f + a99d026 commit 6b36b87

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

include/swift/Reflection/TypeRef.h

+4-13
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)