New operators opStaticIndex and friends
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue May 14 16:15:20 UTC 2019
On Tue, May 14, 2019 at 03:49:51PM +0000, Q. Schroll via Digitalmars-d wrote:
> I whish, D has these operators:
>
> opStaticIndex
> opStaticIndexAssign
> opStaticIndexOpAssign
> opStaticSlice
>
> When used, they look the same way as opIndex and friends, but the
> stuff between [ and ] would be bound to template parameters (instead
> of runtime parameters) and be known at compile time. Basically, this
> allows to implement static indexing the same way it is possible for an
> AliasSeq.
+1. I'd love to have this feature too.
T
--
Don't throw out the baby with the bathwater. Use your hands...
More information about the Digitalmars-d
mailing list