
Thorsten Ottosen wrote:
In that case, I'm confused about why list_of<int>() inserts a default value.
It was a consistency issue. Consider
list_of<int>()(42); // 0, 42 list_of<int>(42)(); // 42, 0 list_of(42)(); // 42, 0
would you expect that to be any different?
I suppose the only consistent interpretation would be for either () to be a no-op (no default's) Proposal 1: list_of<int>()(42); // 42 list_of<int>(42)(); // 42 list_of(42)(); // 42 or the slightly more complex rule that the default constructor always returns an empty list and () only inserts after the list has been created: Proposal 2: list_of<int>(42); // 42 list_of<int>()(42); // 42 list_of<int>(42)(); // 42, 0 list_of(42); // 42 list_of()(42); // 42 list_of(42)(); // 42, 0 list_of<int>()(); // 0 list_of()(); // 0 Michael.