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

Further exploration of the co/contravariant approach #5

Closed Bekenn closed 1 year ago

Bekenn commented 4 years ago

It's so late in my time zone that it's now early, and I'm tired. Apologies for the quhadtaneccccccccccc hal .tdas.whaa?

So... my edits here are clearly wider-ranging than requested. Please pay careful attention to them. My intent here is not (necessarily) that you take this as-is, but rather to serve as a basis for ongoing discussion, and that you use this as a guide to making your own edits. One thing that seems clear to me is that this is not ready for submission today, but that's fine; we can keep using D drafts for discussion, and the next mailing is only a month away.

In particular, I've updated almost every example to use the "mathematically correct" approach in order to showcase what that actually looks like. What I'd actually like to see here is the two approaches side-by-side, but I don't know how to format that in a readable manner, and I doubt we want that much duplication.

I've removed entirely (via html comment tag) the "Impacts on the partial specialization of NTTP templates" section because I don't agree with the basic premise that template auto enables a scenario that was previously unavailable, and it seems to be relying on SFINAE where a C++20 approach would use concepts.

I've also made some consistency changes (such as capitalizing all template parameter names, removing the is_ prefix from (nearly) all concept names), as well as a few editorial corrections.

atomgalaxy commented 1 year ago

This has been integrated manually.