Attempt to work around an MSVC rejects-valid. Apparently it gets the access

check wrong when inheriting a member through two levels of private inheritance,
where the middle one is a class template specialization.

llvm-svn: 259943
This commit is contained in:
Richard Smith 2016-02-05 22:48:19 +00:00
parent ebfdf26d93
commit 4838bd9c22
1 changed files with 5 additions and 7 deletions

View File

@ -79,11 +79,6 @@ public:
/// The base class for TrailingObjects* classes.
class TrailingObjectsBase {
public:
/// Disable sized deallocation for all objects with trailing object storage;
/// the inferred size will typically not be correct.
void operator delete(void *P) { return ::operator delete(P); }
protected:
/// OverloadToken's purpose is to allow specifying function overloads
/// for different types, without actually taking the types as
@ -295,10 +290,13 @@ class TrailingObjects : private trailing_objects_internal::TrailingObjectsImpl<
}
public:
// Make these (privately inherited) members public.
using ParentType::operator delete;
// Make this (privately inherited) member public.
using ParentType::OverloadToken;
/// Disable sized deallocation for all objects with trailing object storage;
/// the inferred size will typically not be correct.
void operator delete(void *P) { return ::operator delete(P); }
/// Returns a pointer to the trailing object array of the given type
/// (which must be one of those specified in the class template). The
/// array may have zero or more elements in it.