Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-05-13 09:08:54

"Neal D. Becker" <ndbecker2_at_[hidden]> writes:

> I wonder if there is a more elegant approach?

Yeah: cache a value in the iterator with boost::optional<value_type>.
Put a new value in the cache when the iterator is incremented.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at