You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surge makes extensive use of const generics to allow statically sized arrays throughout rather than Vectors or Slices.
In order to use this pattern through our generic SubtableStrategy traits we require the use of feature(generic_const_exprs) which is highly unstable. Beyond the instability, we have strange artifacts on many of our impls, such as [(); S::NUM_SUBTABLES]: Sized. These tell the compiler that the const generic expression is bounded.
It's likely that the overhead of using Slices and len asserts everywhere is minimal enough to be irrelevant. It's worth considering whether the benefit is worth the downside.
The text was updated successfully, but these errors were encountered:
Surge makes extensive use of const generics to allow statically sized arrays throughout rather than Vectors or Slices.
In order to use this pattern through our generic
SubtableStrategy
traits we require the use offeature(generic_const_exprs)
which is highly unstable. Beyond the instability, we have strange artifacts on many of our impls, such as[(); S::NUM_SUBTABLES]: Sized
. These tell the compiler that the const generic expression is bounded.It's likely that the overhead of using Slices and len asserts everywhere is minimal enough to be irrelevant. It's worth considering whether the benefit is worth the downside.
The text was updated successfully, but these errors were encountered: