
14 Dec
2011
14 Dec
'11
6:12 p.m.
Hi All
Is there an easy and obvious way to construct a single element range from a value_type of that range?
Thx
- Rob.
How about: template <typename T> boost::iterator_range<T*> singular(T& t) { return boost::make_iterator_range(&t, &t + 1); } Of course you'll want a const version as well. Regards, Nate