diff --git a/view.hpp b/view.hpp index ca5c8c9d..c9468f41 100644 --- a/view.hpp +++ b/view.hpp @@ -36,6 +36,9 @@ namespace util { constexpr view (T first, T last) noexcept; + template constexpr explicit view ( K &klass); + template constexpr explicit view (const K &klass); + constexpr T& begin (void) noexcept; constexpr T& end (void) noexcept; diff --git a/view.ipp b/view.ipp index 7dcf9622..3f05056b 100644 --- a/view.ipp +++ b/view.ipp @@ -46,6 +46,26 @@ util::view::view (T _begin, T _end) noexcept: //----------------------------------------------------------------------------- template +template +constexpr +util::view::view (K &data): + m_begin (std::begin (data)), + m_end (std::end (data)) +{ ; } + + +//----------------------------------------------------------------------------- +template +template +constexpr +util::view::view (const K &data): + m_begin (std::begin (data)), + m_end (std::end (data)) +{ ; } + + +/////////////////////////////////////////////////////////////////////////////// +template constexpr T& util::view::begin (void) noexcept {