diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-11 01:19:36 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-11 01:19:36 +0000 |
commit | c6352c1f7c9e1f5680e54c50de05b1a18781c7b1 (patch) | |
tree | 09c0b34a5105963fc00f34a75c7714ecdf7d4855 | |
parent | Rebalance shadow band distribution (diff) | |
download | ilt-culling.tar.bz2 ilt-culling.tar.xz ilt-culling.zip |
Perfectly forward range when materializingculling
-rw-r--r-- | lib/collections.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/collections.h b/lib/collections.h index b921424..e182af5 100644 --- a/lib/collections.h +++ b/lib/collections.h @@ -140,16 +140,16 @@ vectorOfN(std::integral auto N, T start = {}, T step = 1) template<template<typename...> typename Rtn = std::vector, typename In> [[nodiscard]] auto -materializeRange(const In begin, const In end) +materializeRange(In && begin, In && end) { - return Rtn(begin, end); + return Rtn(std::forward<In>(begin), std::forward<In>(end)); } template<template<typename...> typename Rtn = std::vector, IterableCollection In> [[nodiscard]] auto -materializeRange(const In & in) +materializeRange(In && in) { - return materializeRange<Rtn>(in.begin(), in.end()); + return materializeRange<Rtn>(std::forward<In>(in).begin(), std::forward<In>(in).end()); } template<template<typename...> typename Rtn = std::vector, typename In> |