view: allow implicit conversion from const*const* to const**
This commit is contained in:
parent
c9cc38eac7
commit
6f14c7c65b
14
view.hpp
14
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<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 <
|
||||||
|
Loading…
Reference in New Issue
Block a user