Can you write a concept for ContiguousIterator?

I know that there is a concept of ContiguousIterator in the specification of words , but I wonder if it can be written using the C ++ 20 / C ++ 17 TS Syntax Concept.

My problem is that, unlike RandomAccessIterator, ContiguousIterator requires not only some operations, such as it+123, but also depends on the execution time of the result of this operation.

+4
source share
2 answers

No, you cannot, not without a class of attributes or another helper, where types refuse to be adjacent.

+1
source

. , , . , iterator_category ( iterator_traits); ad-hoc. . ( , ?) . →

+2

Source: https://habr.com/ru/post/1690471/


All Articles