Use the same tag type across all PointerLikeTypeTraits specializations

Works around a bug (PR28216) in Clang's MS mangling of templates with
partial specializations.

This mismatch was introduced in about six months ago in r256656.

llvm-svn: 273223
This commit is contained in:
Reid Kleckner 2016-06-20 23:50:21 +00:00
parent 96c0eb45f8
commit 4b1a130643

View File

@ -37,7 +37,8 @@ template <> struct ConstantLog2<1> : std::integral_constant<size_t, 0> {};
}
// Provide PointerLikeTypeTraits for non-cvr pointers.
template <typename T> struct PointerLikeTypeTraits<T *> {
template <typename T> class PointerLikeTypeTraits<T *> {
public:
static inline void *getAsVoidPointer(T *P) { return P; }
static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
@ -46,7 +47,8 @@ template <typename T> struct PointerLikeTypeTraits<T *> {
};
};
template <> struct PointerLikeTypeTraits<void *> {
template <> class PointerLikeTypeTraits<void *> {
public:
static inline void *getAsVoidPointer(void *P) { return P; }
static inline void *getFromVoidPointer(void *P) { return P; }