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;
constexpr
view (T first, T last) noexcept:
view (const T &first, const T &last) noexcept:
m_begin (first),
m_end (last)
{ ; }
@ -66,6 +66,7 @@ namespace util {
m_end (std::end (klass))
{ ; }
template <typename K>
constexpr explicit
view (const K &klass):