cmcstl2
cmcstl2 copied to clipboard
add const_view
I plan to make a proposal out of this and would like to have an implementation looked at beforehand.
Note that the adapter is named views::as_const
as opposed to const_
in range-v3. This is inspired by the fact that views::move
is conceptually applying std::move
on every element the same way that this view conceptually applies std::as_const
.
Another possible name is const_elements
, suggested by @cjdb.