|
clang 24.0.0git
|
TemplateSpecCandidate - This is a generalization of OverloadCandidate which keeps track of template argument deduction failure info, when handling explicit specializations (and instantiations) of templates beyond function overloading. More...
#include "clang/Sema/TemplateDeduction.h"
Public Member Functions | |
| void | set (DeclAccessPair Found, Decl *Spec, DeductionFailureInfo Info) |
| void | NoteDeductionFailure (Sema &S, bool ForTakingAddress, TemplateSpecCandidateSetKind CandidateSetKind) |
| Diagnose a template argument deduction failure. | |
Public Attributes | |
| DeclAccessPair | FoundDecl |
| The declaration that was looked up, together with its access. | |
| Decl * | Specialization |
| Specialization - The actual specialization that this candidate represents. | |
| DeductionFailureInfo | DeductionFailure |
| Template argument deduction info. | |
TemplateSpecCandidate - This is a generalization of OverloadCandidate which keeps track of template argument deduction failure info, when handling explicit specializations (and instantiations) of templates beyond function overloading.
For now, assume that the candidates are non-matching specializations. TODO: In the future, we may need to unify/generalize this with OverloadCandidate.
Definition at line 326 of file TemplateDeduction.h.
| void TemplateSpecCandidate::NoteDeductionFailure | ( | Sema & | S, |
| bool | ForTakingAddress, | ||
| TemplateSpecCandidateSetKind | CandidateSetKind ) |
Diagnose a template argument deduction failure.
We are treating these failures as overload failures due to bad deductions.
Definition at line 13644 of file SemaOverload.cpp.
References DeductionFailure, DiagnoseBadDeduction(), FoundDecl, and Specialization.
Referenced by clang::TemplateSpecCandidateSet::NoteCandidates().
|
inline |
Definition at line 338 of file TemplateDeduction.h.
References DeductionFailure, clang::Found, FoundDecl, and Specialization.
Referenced by clang::Sema::ActOnExplicitInstantiation(), AddFriendTemplateDeductionCandidate(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckVarTemplateId(), getPatternForClassTemplateSpecialization(), and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
| DeductionFailureInfo clang::TemplateSpecCandidate::DeductionFailure |
Template argument deduction info.
Definition at line 336 of file TemplateDeduction.h.
Referenced by NoteDeductionFailure(), and set().
| DeclAccessPair clang::TemplateSpecCandidate::FoundDecl |
The declaration that was looked up, together with its access.
Might be a UsingShadowDecl, but usually a FunctionTemplateDecl.
Definition at line 329 of file TemplateDeduction.h.
Referenced by NoteDeductionFailure(), and set().
| Decl* clang::TemplateSpecCandidate::Specialization |
Specialization - The actual specialization that this candidate represents.
When NULL, this may be a built-in candidate.
Definition at line 333 of file TemplateDeduction.h.
Referenced by GetLocationForCandidate(), clang::TemplateSpecCandidateSet::NoteCandidates(), NoteDeductionFailure(), and set().