Partial class template argument deduction in C++17

CTAD (Class Template Argument Deduction) is an all or nothing process currently. You either specify nothing and allow the compiler to deduce all of the arguments, or you specify all of the arguments taking the compiler out of the loop.

There is a paper (P1021R0) which asks for this and more, but it has not yet been accepted. There was a paper asking for partial specialization but after revisions it has been removed. The newest revision still includes a proposal to have CTAD function when using an alias.


Per @Barry Support for Alias templates (P1814) and Aggregates (P1816) have been added to the working draft for C++20. No support for partial CTAD or CTAD with inherited constructors has been added.

Leave a Comment