[Range] Generating a singular range.

14 Dec
2011
14 Dec
'11
6 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.

14 Dec
14 Dec
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

17 Dec
17 Dec
1:22 p.m.
On 12/14/2011 07:00 PM, Robert Jones wrote:
Hi All
Is there an easy and obvious way to construct a single element range from a value_type of that range?
boost::list_of(a) boost::ref_list_of(a); boost::cref_list_of(a); also works for multiple elements boost::list_of(a)(b)(c); etc.
4896
Age (days ago)
4899
Last active (days ago)
2 comments
3 participants
participants (3)
-
Mathias Gaunard
-
Nathan Ridge
-
Robert Jones