Daily bit(e) of C++ | deduction guides for CTAD
Daily bit(e) of C++ ♻️185, Customizing behaviour of Class Template Argument Deduction using deduction guides.
Deduction guides are rules that instruct Class Template Argument Deduction (CTAD).
The compiler automatically generates guides that map each constructor call argument to a template parameter.
However, we can also provide custom guides to modify the default behaviour or trigger CTAD even when the constructor arguments don’t directly map to template parameters.