diff --git a/BAN/include/BAN/Iterators.h b/BAN/include/BAN/Iterators.h index 36af28bfd6..003c578428 100644 --- a/BAN/include/BAN/Iterators.h +++ b/BAN/include/BAN/Iterators.h @@ -36,6 +36,25 @@ namespace BAN return it - count; } + template + size_t distance(It it1, It it2) + { + size_t dist = 0; + while (it1 != it2) + { + ++it1; + ++dist; + } + return dist; + } + + template + requires requires(It it1, It it2) { requires is_integral_v; } + size_t distance(It it1, It it2) + { + return it2 - it1; + } + template class IteratorSimpleGeneral {