view: constructor should take iterators by constref

who knows how big the iterators are, or if they can be moved.
This commit is contained in:
Danny Robson 2017-09-14 13:24:08 +10:00
parent 015dff80a0
commit c222e4e960

View File

@ -34,7 +34,7 @@ namespace util {
using value_type = typename std::iterator_traits<remove_restrict_t<T>>::value_type; using value_type = typename std::iterator_traits<remove_restrict_t<T>>::value_type;
constexpr constexpr
view (T first, T last) noexcept: view (const T &first, const T &last) noexcept:
m_begin (first), m_begin (first),
m_end (last) m_end (last)
{ ; } { ; }
@ -66,6 +66,7 @@ namespace util {
m_end (std::end (klass)) m_end (std::end (klass))
{ ; } { ; }
template <typename K> template <typename K>
constexpr explicit constexpr explicit
view (const K &klass): view (const K &klass):