
16 Jun
2010
16 Jun
'10
4:59 p.m.
Thorsten Ottosen wrote:
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.
Does list_of<T>() have a default value for its T parameter? Maybe introduce no-params list_of<T>() to produce an empty list, while list_of<T>(const T&) keeps its current implementation? That would seem to behave intuitively in both cases...