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;
|
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):
|
||||||
|
Loading…
Reference in New Issue
Block a user