atomgalaxy / isocpp-universal-template-param

We propose a way to spell a universal template parameter kind. This would allow for a generic apply and other higher-order template metafunctions, and certain typetraits.
https://atomgalaxy.github.io/isocpp-universal-template-param/d1985r0.pdf
2 stars 2 forks source link

Add a concrete example showing co-/contravariance in action. #9

Closed BengtGustafsson closed 1 year ago

BengtGustafsson commented 1 year ago

I'm thinking that the reason we can't see advantages to mathematically correct is that we are at the bottom of the hierarchy, where there is no further step to even less specificity.

On the other hand I think what was said about auto being contravariant means that:

template<template class X> class Y {};

Here only these forms of arguments are allowed, if I understand correctly:

template