aboutsummaryrefslogtreecommitdiff
path: root/src/reverse_iterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/reverse_iterator.h')
-rw-r--r--src/reverse_iterator.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reverse_iterator.h b/src/reverse_iterator.h
index ab467f07c9..729d8c11cc 100644
--- a/src/reverse_iterator.h
+++ b/src/reverse_iterator.h
@@ -5,7 +5,7 @@
/**
* Template used for reverse iteration in C++11 range-based for loops.
- *
+ *
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << " ";
@@ -15,21 +15,21 @@ template <typename T>
class reverse_range
{
T &m_x;
-
+
public:
explicit reverse_range(T &x) : m_x(x) {}
-
+
auto begin() const -> decltype(this->m_x.rbegin())
{
return m_x.rbegin();
}
-
+
auto end() const -> decltype(this->m_x.rend())
{
return m_x.rend();
}
};
-
+
template <typename T>
reverse_range<T> reverse_iterate(T &x)
{