Integrating a C++20 like span library

https://github.com/tcbrindle/span

Replacing a homebrew const pointer wrapper const correctness helper
with the C++20 like span library.

One day when we switch to C++20 we will just use the C++20 spans instead.
This commit is contained in:
Vojtech Bubnik 2022-10-19 16:26:59 +02:00
parent acbc60f3e3
commit 2ced762948
12 changed files with 770 additions and 57 deletions

View file

@ -39,7 +39,7 @@ static void append_and_translate(Polygons &dst, const Polygons &src, const Print
dst[dst_idx].translate(instance.shift.x(), instance.shift.y());
}
static float max_brim_width(const ConstPrintObjectPtrsAdaptor &objects)
static float max_brim_width(const SpanOfConstPtrs<PrintObject> &objects)
{
assert(!objects.empty());
return float(std::accumulate(objects.begin(), objects.end(), 0.,