view: allow implicit conversion from const*const* to const**

This commit is contained in:
Danny Robson 2018-01-30 16:25:48 +11:00
parent c9cc38eac7
commit 6f14c7c65b

View File

@ -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<BeginT, const ValueT**> &&
std::is_same_v<EndT, const ValueT**>
>
>
view (const view<const ValueT*const*,const ValueT*const*> &rhs):
m_begin (const_cast<const ValueT**> (rhs.begin ())),
m_end (const_cast<const ValueT**> (rhs.end ()))
{ ; }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// implicit conversion from pointer views to const pointer views // implicit conversion from pointer views to const pointer views
template < template <