From 6f14c7c65b5cc5341d480faad8fd63b9431ec9ab Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 30 Jan 2018 16:25:48 +1100 Subject: [PATCH] view: allow implicit conversion from const*const* to const** --- view.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/view.hpp b/view.hpp index abc81b06..85c1fb59 100644 --- a/view.hpp +++ b/view.hpp @@ -79,6 +79,20 @@ namespace util { { ; } + //--------------------------------------------------------------------- + // implicit conversion from const pointer const views to const pointer views + template < + typename ValueT, + typename = std::enable_if_t< + std::is_same_v && + std::is_same_v + > + > + view (const view &rhs): + m_begin (const_cast (rhs.begin ())), + m_end (const_cast (rhs.end ())) + { ; } + //--------------------------------------------------------------------- // implicit conversion from pointer views to const pointer views template <