class CXXDeductionGuideDecl

Declaration

class CXXDeductionGuideDecl : public FunctionDecl { /* full declaration omitted */ };

Description

Represents a C++ deduction guide declaration. In this example, there will be an explicit deduction guide from the second line, and implicit deduction guide templates synthesized from the constructors of \c A.

Declared at: clang/include/clang/AST/DeclCXX.h:1883

Inherits from: FunctionDecl

Member Variables

private clang::CXXConstructorDecl* Ctor
private clang::ExplicitSpecifier ExplicitSpec

Inherited from DeclContext:

protected
protected FirstDecl = nullptr
protected LastDecl = nullptr

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • private CXXDeductionGuideDecl(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::ExplicitSpecifier ES, const clang::DeclarationNameInfo & NameInfo, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::SourceLocation EndLocation, clang::CXXConstructorDecl * Ctor)
  • public static clang::CXXDeductionGuideDecl * Create(clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation StartLoc, clang::ExplicitSpecifier ES, const clang::DeclarationNameInfo & NameInfo, clang::QualType T, clang::TypeSourceInfo * TInfo, clang::SourceLocation EndLocation, clang::CXXConstructorDecl * Ctor = nullptr)
  • public static clang::CXXDeductionGuideDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
  • private void anchor()
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public clang::CXXConstructorDecl * getCorrespondingConstructor() const
  • public clang::TemplateDecl * getDeducedTemplate() const
  • public clang::ExplicitSpecifier getExplicitSpecifier()
  • public const clang::ExplicitSpecifier getExplicitSpecifier() const
  • public bool isCopyDeductionCandidate() const
  • public bool isExplicit() const
  • private void setExplicitSpecifier(clang::ExplicitSpecifier ES)
  • public void setIsCopyDeductionCandidate(bool isCDC = true)

Inherited from FunctionDecl:

Inherited from DeclContext:

Inherited from DeclaratorDecl:

Inherited from ValueDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

CXXDeductionGuideDecl(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation StartLoc,
    clang::ExplicitSpecifier ES,
    const clang::DeclarationNameInfo& NameInfo,
    clang::QualType T,
    clang::TypeSourceInfo* TInfo,
    clang::SourceLocation EndLocation,
    clang::CXXConstructorDecl* Ctor)

Declared at: clang/include/clang/AST/DeclCXX.h:1887

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation StartLoc
clang::ExplicitSpecifier ES
const clang::DeclarationNameInfo& NameInfo
clang::QualType T
clang::TypeSourceInfo* TInfo
clang::SourceLocation EndLocation
clang::CXXConstructorDecl* Ctor

static clang::CXXDeductionGuideDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation StartLoc,
    clang::ExplicitSpecifier ES,
    const clang::DeclarationNameInfo& NameInfo,
    clang::QualType T,
    clang::TypeSourceInfo* TInfo,
    clang::SourceLocation EndLocation,
    clang::CXXConstructorDecl* Ctor = nullptr)

Declared at: clang/include/clang/AST/DeclCXX.h:1909

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation StartLoc
clang::ExplicitSpecifier ES
const clang::DeclarationNameInfo& NameInfo
clang::QualType T
clang::TypeSourceInfo* TInfo
clang::SourceLocation EndLocation
clang::CXXConstructorDecl* Ctor = nullptr

static clang::CXXDeductionGuideDecl*
CreateDeserialized(clang::ASTContext& C,
                   unsigned int ID)

Declared at: clang/include/clang/AST/DeclCXX.h:1914

Parameters

clang::ASTContext& C
unsigned int ID

void anchor()

Declared at: clang/include/clang/AST/DeclCXX.h:1884

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclCXX.h:1942

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclCXX.h:1943

Parameters

clang::Decl::Kind K

clang::CXXConstructorDecl*
getCorrespondingConstructor() const

Description

Get the constructor from which this deduction guide was generated, if this is an implicit deduction guide.

Declared at: clang/include/clang/AST/DeclCXX.h:1929

clang::TemplateDecl* getDeducedTemplate() const

Description

Get the template for which this guide performs deduction.

Declared at: clang/include/clang/AST/DeclCXX.h:1923

clang::ExplicitSpecifier getExplicitSpecifier()

Declared at: clang/include/clang/AST/DeclCXX.h:1916

const clang::ExplicitSpecifier
getExplicitSpecifier() const

Declared at: clang/include/clang/AST/DeclCXX.h:1917

bool isCopyDeductionCandidate() const

Declared at: clang/include/clang/AST/DeclCXX.h:1937

bool isExplicit() const

Description

Return true if the declartion is already resolved to be explicit.

Declared at: clang/include/clang/AST/DeclCXX.h:1920

void setExplicitSpecifier(
    clang::ExplicitSpecifier ES)

Declared at: clang/include/clang/AST/DeclCXX.h:1902

Parameters

clang::ExplicitSpecifier ES

void setIsCopyDeductionCandidate(
    bool isCDC = true)

Declared at: clang/include/clang/AST/DeclCXX.h:1933

Parameters

bool isCDC = true