Value extraction checking for deleted copy ctor (ROOT-6385).

During the value extraction the copy constructor availability check must ensure the copy ctor was not deleted.
This commit is contained in:
CristinaCristescu 2014-06-13 18:28:28 +02:00 committed by sftnight
parent a6bb239088
commit aaff0628ca

View File

@ -182,7 +182,9 @@ namespace {
if(RD->hasTrivialCopyConstructor()) return true;
// Lookup the copy canstructor and check its accessiblity.
if (CXXConstructorDecl* CD = S->LookupCopyingConstructor(RD, QT.getCVRQualifiers())) {
if (CD ->getAccess() == clang::AccessSpecifier::AS_public) return true;
if (!CD->isDeleted() && CD ->getAccess() == clang::AccessSpecifier::AS_public) {
return true;
}
}
return false;
}