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:
parent
0d34826218
commit
0abaef604d
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue