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:
parent
015dff80a0
commit
c222e4e960
3
view.hpp
3
view.hpp
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user