Skip to content

Commit

Permalink
Attempt to work around an MSVC rejects-valid. Apparently it gets the …
Browse files Browse the repository at this point in the history
…access

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259943 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zygoloid committed Feb 5, 2016
1 parent 2597d07 commit 6085858
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions include/llvm/Support/TrailingObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ template <typename First> class AlignmentCalcHelper<First> {

/// 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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6085858

Please sign in to comment.