//===- TemplateDeduction.h - C++ template argument deduction ----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file provides types used with Sema's template argument deduction // routines. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_SEMA_TEMPLATEDEDUCTION_H #define LLVM_CLANG_SEMA_TEMPLATEDEDUCTION_H #include "clang/Sema/Ownership.h" #include "clang/Sema/SemaConcept.h" #include "clang/AST/ASTConcept.h" #include "clang/AST/DeclAccessPair.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/TemplateBase.h" #include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/SmallVector.h" #include <cassert> #include <cstddef> #include <optional> #include <utility> namespace clang { class Decl; struct DeducedPack; class Sema; enum class TemplateDeductionResult; namespace sema { /// Provides information about an attempted template argument /// deduction, whose success or failure was described by a /// TemplateDeductionResult value. class TemplateDeductionInfo { … }; } // namespace sema /// A structure used to record information about a failed /// template argument deduction, for diagnosis. struct DeductionFailureInfo { … }; /// 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. struct TemplateSpecCandidate { … }; /// TemplateSpecCandidateSet - A set of generalized overload candidates, /// used in template specializations. /// TODO: In the future, we may need to unify/generalize this with /// OverloadCandidateSet. class TemplateSpecCandidateSet { … }; } // namespace clang #endif // LLVM_CLANG_SEMA_TEMPLATEDEDUCTION_H