I'm looking for a unary functor which will dereference it's argument and return the result. Of course I can write one, it just seemed like something should already exist.
So given the code:
const auto vals = { 0, 1, 2, 3 };
vector<const int*> test(size(vals), nullptr);
iota(begin(test), end(test), data(vals));
transform(cbegin(test), cend(test), ostream_iterator<int>(cout, " "), [](const auto& i){ return *i; });
I was hoping that there was a functor that I could use instead of the lambda. Does such a thing exist, or do I need to just use the lambda?
std
here – Intrusionvector<vector<int>::const_iterator>
:( – Anagrammatize