mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-01 16:40:15 +00:00
Make the type traits for a const pointer defer to those for a unqualified
pointer, instead of providing independent values modelled on the default implementation. llvm-svn: 82620
This commit is contained in:
parent
863ed2677b
commit
24a3aba8b8
@ -50,12 +50,16 @@ public:
|
||||
// Provide PointerLikeTypeTraits for const pointers.
|
||||
template<typename T>
|
||||
class PointerLikeTypeTraits<const T*> {
|
||||
typedef PointerLikeTypeTraits<T*> NonConst;
|
||||
|
||||
public:
|
||||
static inline const void *getAsVoidPointer(const T* P) { return P; }
|
||||
static inline const T *getFromVoidPointer(const void *P) {
|
||||
return static_cast<const T*>(P);
|
||||
static inline const void *getAsVoidPointer(const T* P) {
|
||||
return NonConst::getAsVoidPointer(const_cast<T*>(P));
|
||||
}
|
||||
enum { NumLowBitsAvailable = 2 };
|
||||
static inline const T *getFromVoidPointer(const void *P) {
|
||||
return NonConst::getFromVoidPointer(const_cast<void*>(P));
|
||||
}
|
||||
enum { NumLowBitsAvailable = NonConst::NumLowBitsAvailable };
|
||||
};
|
||||
|
||||
// Provide PointerLikeTypeTraits for uintptr_t.
|
||||
|
Loading…
Reference in New Issue
Block a user