We cannot pass cuda::compute_capability as a template parameter in C+++20 because the type is not a structural type. This is unfortunate, because that type is conceptually a strongly typed int. The only thing preventing it from being structural is that the int __cc_; data member is private.
I propose to make the data member public. Given the prefix __ it is still an implementation detail from a user's perspective. This is also what std::array does, which has a public member array that is an implementation detail.
We cannot pass
cuda::compute_capabilityas a template parameter in C+++20 because the type is not a structural type. This is unfortunate, because that type is conceptually a strongly typedint. The only thing preventing it from being structural is that theint __cc_;data member is private.I propose to make the data member public. Given the prefix
__it is still an implementation detail from a user's perspective. This is also whatstd::arraydoes, which has a public member array that is an implementation detail.