clang 10.0.0git

Public Member Functions | Public Attributes | List of all members
clang::TemplateSpecCandidate Struct Reference

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"`

Collaboration diagram for clang::TemplateSpecCandidate:
[legend]

## Public Member Functions
void | set (DeclAccessPair Found, Decl *Spec, DeductionFailureInfo Info)
void | NoteDeductionFailure (Sema &S, bool ForTakingAddress)
| Diagnose a template argument deduction failure. More...

## Public Attributes
DeclAccessPair | FoundDecl
| The declaration that was looked up, together with its access. More...
Decl * | Specialization
| Specialization - The actual specialization that this candidate represents. More...
DeductionFailureInfo | DeductionFailure
| Template argument deduction info. More...

## Detailed Description

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 283 of file TemplateDeduction.h.

## Member Function Documentation

## ◆ NoteDeductionFailure()

void TemplateSpecCandidate::NoteDeductionFailure | ( | Sema & | S,
|  | bool | ForTakingAddress
| ) |  |

Diagnose a template argument deduction failure.

We are treating these failures as overload failures due to bad deductions.

Definition at line 11480 of file SemaOverload.cpp.

References DiagnoseBadDeduction().

Referenced by clang::TemplateSpecCandidateSet::NoteCandidates().

## ◆ set()

void clang::TemplateSpecCandidate::set | ( | DeclAccessPair | Found,
|  | Decl * | Spec,
|  | DeductionFailureInfo | Info
| ) |  |
| inline

Definition at line 295 of file TemplateDeduction.h.

## Member Data Documentation

## ◆ DeductionFailure

DeductionFailureInfo clang::TemplateSpecCandidate::DeductionFailure

Template argument deduction info.

Definition at line 293 of file TemplateDeduction.h.

## ◆ FoundDecl

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 286 of file TemplateDeduction.h.

## ◆ Specialization

Decl* clang::TemplateSpecCandidate::Specialization

Specialization - The actual specialization that this candidate represents.

When NULL, this may be a built-in candidate.

Definition at line 290 of file TemplateDeduction.h.

Referenced by GetLocationForCandidate(), and clang::TemplateSpecCandidateSet::NoteCandidates().

The documentation for this struct was generated from the following files:

- include/clang/Sema/TemplateDeduction.h
- lib/Sema/SemaOverload.cpp