fix sindex step size

This commit is contained in:
Christian Zimmermann 2024-07-09 19:29:23 +02:00
parent f0401e50bf
commit 8c35113967
2 changed files with 8 additions and 3 deletions

View file

@ -128,9 +128,14 @@ namespace CNORXZ
template <typename MetaT, SizeT S>
template <SizeT I>
UPos SIndex<MetaT,S>::stepSize(const IndexId<I>& id) const
decltype(auto) SIndex<MetaT,S>::stepSize(const IndexId<I>& id) const
{
return UPos(id == this->id() ? 1 : 0);
if constexpr(I != 0){
return SPos<0>();
}
else {
return UPos(id == this->id() ? 1 : 0);
}
}
template <typename MetaT, SizeT S>

View file

@ -88,7 +88,7 @@ namespace CNORXZ
/** @copydoc IndexInterface::stepSize() */
template <SizeT I>
UPos stepSize(const IndexId<I>& id) const;
decltype(auto) stepSize(const IndexId<I>& id) const;
/** @copydoc IndexInterface::stringMeta() */
String stringMeta() const;