geom/segment: add convenience 'indices' wrapper function

This commit is contained in:
Danny Robson 2019-09-10 10:42:13 +10:00
parent 2969cb3954
commit fe6afc1edf

View File

@ -31,6 +31,16 @@ namespace cruft::geom {
.b = b.template cast<CastT> ()
};
}
template <std::size_t ...Indices, typename ...ArgsT>
segment<sizeof...(Indices),T>
indices (ArgsT &&...args)
{
return segment<sizeof...(Indices),T> {
.a = a.template indices<Indices...> (args...),
.b = b.template indices<Indices...> (args...),
};
}
};