diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-10-14 14:27:43 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-10-14 14:27:43 +0000 |
| commit | c5be69a9a996d2f5694709017c23097b2cd9cc1f (patch) | |
| tree | 4c11d04fac03dcc97d54d5b816450d0d77aeff9a /src/buffer.hh | |
| parent | 2d54a7818e1e372f7f110e284b45c11091f39785 (diff) | |
BufferCoord: allow explicit construction from all LineAndColumns
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index a2a1933e..e4410566 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -23,6 +23,12 @@ struct BufferCoord : LineAndColumn<BufferCoord> { BufferCoord(int line = 0, int column = 0) : LineAndColumn(line, column) {} + + template<typename T> + explicit BufferCoord(const LineAndColumn<T>& other) + : LineAndColumn(other.line, other.column) + { + } }; class BufferIterator |
