First Draft: Implicit Conversion of Template Instantiations

Timon Gehr timon.gehr at gmx.ch
Mon Mar 18 01:37:52 UTC 2024


On 3/18/24 02:11, Timon Gehr wrote:
> 
> 
> Drawbacks:
> 
> - Slightly more expensive to determine that subtyping holds. (First, you 
> check the arguments according to the variance annotations, if that 
> succeeds, you still have to perform the member-wise check.)
> 
> - This particular proposal would disallow a template type with variance 
> of one template parameter varying based on one of the other template 
> parameters.

A way to address this would be to also allow `struct S(+-T)`, which 
always just uses the field-wise check.


More information about the dip.development mailing list