Use std::begin/std::end in containers.hh instead of the method version

This commit is contained in:
Maxime Coste 2016-10-11 00:17:00 +01:00
parent 025b91baca
commit f6cdc2eee5

View File

@ -97,8 +97,8 @@ struct FilterView
const FilterView& m_view; const FilterView& m_view;
}; };
Iterator begin() const { return {*this, m_container.begin(), m_container.end()}; } Iterator begin() const { return {*this, std::begin(m_container), std::end(m_container)}; }
Iterator end() const { return {*this, m_container.end(), m_container.end()}; } Iterator end() const { return {*this, std::end(m_container), std::end(m_container)}; }
Container m_container; Container m_container;
Filter m_filter; Filter m_filter;
@ -154,8 +154,8 @@ struct TransformView
const TransformView& m_view; const TransformView& m_view;
}; };
Iterator begin() const { return {*this, m_container.begin()}; } Iterator begin() const { return {*this, std::begin(m_container)}; }
Iterator end() const { return {*this, m_container.end()}; } Iterator end() const { return {*this, std::end(m_container)}; }
Container m_container; Container m_container;
Transform m_transform; Transform m_transform;
@ -225,8 +225,8 @@ struct SplitView
Separator separator; Separator separator;
}; };
Iterator begin() const { return {m_container.begin(), m_container.end(), m_separator}; } Iterator begin() const { return {std::begin(m_container), std::end(m_container), m_separator}; }
Iterator end() const { return {m_container.end(), m_container.end(), m_separator}; } Iterator end() const { return {std::end(m_container), std::end(m_container), m_separator}; }
Container m_container; Container m_container;
Separator m_separator; Separator m_separator;