BufferCoord: allow explicit construction from all LineAndColumns

This commit is contained in:
Maxime Coste 2011-10-14 14:27:43 +00:00
parent 2d54a7818e
commit c5be69a9a9

View File

@ -23,6 +23,12 @@ struct BufferCoord : LineAndColumn<BufferCoord>
{ {
BufferCoord(int line = 0, int column = 0) BufferCoord(int line = 0, int column = 0)
: LineAndColumn(line, column) {} : LineAndColumn(line, column) {}
template<typename T>
explicit BufferCoord(const LineAndColumn<T>& other)
: LineAndColumn(other.line, other.column)
{
}
}; };
class BufferIterator class BufferIterator