[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 2 03:08:45 PDT 2024


hokein wrote:

> The current implementation strictly follows the standard's specification for replacing the return type of an alias deduction guide.
> 
> However, this approach adds some implicit declarations in the AST (in terms of the partial class template specialization), which is cumbersome. There is an alternative approach, which is to perform an earlier deduction (when building the deduction guide) instead of instantiation time deduction, it would allow us to avoid having these implicit decls in the AST. This is the approach taken by gcc.
> 
> The downside is that we diverge from the standard, which might result in subtle differences. What do people think? @cor3ntin @mizvekov @zygoloid

I think implementation is appropriate since it follows to the standard’s specification. We should implement it correctly at first. Any further improvements or optimizations can be explored in the future if they become necessary.


https://github.com/llvm/llvm-project/pull/98788


More information about the cfe-commits mailing list