diff --git a/src/common/iterator_util.h b/src/common/iterator_util.h index f95fc165..c35cc15b 100644 --- a/src/common/iterator_util.h +++ b/src/common/iterator_util.h @@ -15,12 +15,12 @@ template struct ReverseAdapter { T& iterable; - auto begin() { + constexpr auto begin() { using namespace std; return rbegin(iterable); } - auto end() { + constexpr auto end() { using namespace std; return rend(iterable); } @@ -29,7 +29,7 @@ struct ReverseAdapter { } // namespace detail template -detail::ReverseAdapter Reverse(T&& iterable) { +constexpr detail::ReverseAdapter Reverse(T&& iterable) { return detail::ReverseAdapter{iterable}; }