#ifndef utils_hh_INCLUDED #define utils_hh_INCLUDED namespace Kakoune { struct LineAndColumn { int line; int column; LineAndColumn(int line = 0, int column = 0) : line(line), column(column) {} }; template struct ReversedContainer { ReversedContainer(Container& container) : container(container) {} Container& container; decltype(container.rbegin()) begin() { return container.rbegin(); } decltype(container.rend()) end() { return container.rend(); } }; template ReversedContainer reversed(Container& container) { return ReversedContainer(container); } } #endif // utils_hh_INCLUDED