Do not tag BufferIterator as random access
Boost regex considers that random access means fast distance computation, which is not the case for BufferIterator where Buffer::distance is O(num lines between them) which can get big on large files. Fixes #462
This commit is contained in:
parent
6273aa9443
commit
719997f0ab
|
@ -24,7 +24,7 @@ public:
|
||||||
using difference_type = size_t;
|
using difference_type = size_t;
|
||||||
using pointer = const value_type*;
|
using pointer = const value_type*;
|
||||||
using reference = const value_type&;
|
using reference = const value_type&;
|
||||||
using iterator_category = std::random_access_iterator_tag;
|
using iterator_category = std::bidirectional_iterator_tag;
|
||||||
|
|
||||||
BufferIterator() : m_buffer(nullptr) {}
|
BufferIterator() : m_buffer(nullptr) {}
|
||||||
BufferIterator(const Buffer& buffer, ByteCoord coord);
|
BufferIterator(const Buffer& buffer, ByteCoord coord);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user