Re: [boost] [Boost.Assign] list_of::range without an initial (single) element?

15 Jun
2010
15 Jun
'10
5:13 p.m.
er skrev:
Michael McNeil Forbes wrote:
What is the recommended way of initializing an array from a concatenation of other arrays?
list_of::range looks right and I would like to use something like:
array<int, 2> a = { 1, 2 }; array<int, 2> b = { 3, 4 }; array<int, 4> c = list_of<int>().range(a).range(b);
However, list_of<int>() inserts a default value (so that list_of<int>().range(a).range(b) == {0,1,2,3,4}).
Maybe we should add empty_list_of<int>() ? It's quite trivial to add. -Thorsten
5476
Age (days ago)
5476
Last active (days ago)
0 comments
1 participants
participants (1)
-
Thorsten Ottosen