class TemplateDeductionInfo

Declaration

class TemplateDeductionInfo { /* full declaration omitted */ };

Description

Provides information about an attempted template argument deduction, whose success or failure was described by a TemplateDeductionResult value.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:42

Member Variables

private clang::TemplateArgumentList* Deduced = nullptr
The deduced template argument list.
private clang::SourceLocation Loc
The source location at which template argument deduction is occurring.
private bool HasSFINAEDiagnostic = false
Have we suppressed an error during deduction?
private unsigned int DeducedDepth
The template parameter depth for which we're performing deduction.
private unsigned int ExplicitArgs = 0
The number of parameters with explicitly-specified template arguments, up to and including the partially-specified pack (if any).
private SmallVector<clang::PartialDiagnosticAt, 4> SuppressedDiagnostics
Warnings (and follow-on notes) that were suppressed due to SFINAE while performing template argument deduction.
public clang::TemplateParameter Param
TDK_Inconsistent: this is the template parameter for which two different template argument values were deduced.
public clang::TemplateArgument FirstArg
TDK_NonDeducedMismatch: this is the component of the 'parameter' of the deduction, directly provided in the source code.
public clang::TemplateArgument SecondArg
FIXME: Finish documenting this.
public unsigned int CallArgIndex = 0
TDK_DeducedMismatch: this is the index of the argument that had a different argument type from its substituted parameter type.
public SmallVector<clang::DeducedPack*, 8> PendingDeducedPacks
FIXME: This should be kept internal to SemaTemplateDeduction.
public clang::ConstraintSatisfaction AssociatedConstraintsSatisfaction

Method Overview

Methods

TemplateDeductionInfo(
    const clang::sema::TemplateDeductionInfo&)

Declared at: clang/include/clang/Sema/TemplateDeduction.h:67

Parameters

const clang::sema::TemplateDeductionInfo&

TemplateDeductionInfo(
    clang::sema::TemplateDeductionInfo::
        ForBaseTag,
    const clang::sema::TemplateDeductionInfo&
        Info)

Description

Create temporary template deduction info for speculatively deducing against a base class of an argument's type.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:73

Parameters

clang::sema::TemplateDeductionInfo::ForBaseTag
const clang::sema::TemplateDeductionInfo& Info

TemplateDeductionInfo(
    clang::SourceLocation Loc,
    unsigned int DeducedDepth = 0)

Declared at: clang/include/clang/Sema/TemplateDeduction.h:65

Parameters

clang::SourceLocation Loc
unsigned int DeducedDepth = 0

void addSFINAEDiagnostic(
    clang::SourceLocation Loc,
    clang::PartialDiagnostic PD)

Description

Set the diagnostic which caused the SFINAE failure.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:140

Parameters

clang::SourceLocation Loc
clang::PartialDiagnostic PD

void addSuppressedDiagnostic(
    clang::SourceLocation Loc,
    clang::PartialDiagnostic PD)

Description

Add a new diagnostic to the set of diagnostics

Declared at: clang/include/clang/Sema/TemplateDeduction.h:150

Parameters

clang::SourceLocation Loc
clang::PartialDiagnostic PD

void clearSFINAEDiagnostic()

Description

Discard any SFINAE diagnostics.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:110

clang::sema::TemplateDeductionInfo::diag_iterator
diag_begin() const

Description

Returns an iterator at the beginning of the sequence of suppressed diagnostics.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:162

clang::sema::TemplateDeductionInfo::diag_iterator
diag_end() const

Description

Returns an iterator at the end of the sequence of suppressed diagnostics.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:166

unsigned int getDeducedDepth() const

Description

The depth of template parameters for which deduction is being performed.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:85

clang::SourceLocation getLocation() const

Description

Returns the location at which template argument is occurring.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:79

unsigned int getNumExplicitArgs() const

Description

Get the number of explicitly-specified arguments.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:90

bool hasSFINAEDiagnostic() const

Description

Is a SFINAE diagnostic available?

Declared at: clang/include/clang/Sema/TemplateDeduction.h:135

const clang::PartialDiagnosticAt&
peekSFINAEDiagnostic() const

Description

Peek at the SFINAE diagnostic.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:116

void reset(
    clang::TemplateArgumentList* NewDeduced)

Description

Provide a new template argument list that contains the results of template argument deduction.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:130

Parameters

clang::TemplateArgumentList* NewDeduced

void setExplicitArgs(
    clang::TemplateArgumentList* NewDeduced)

Description

Provide an initial template argument list that contains the explicitly-specified arguments.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:123

Parameters

clang::TemplateArgumentList* NewDeduced

clang::TemplateArgumentList* take()

Description

Take ownership of the deduced template argument list.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:95

void takeSFINAEDiagnostic(
    clang::PartialDiagnosticAt& PD)

Description

Take ownership of the SFINAE diagnostic.

Declared at: clang/include/clang/Sema/TemplateDeduction.h:102

Parameters

clang::PartialDiagnosticAt& PD