diff --git a/src/util/list.h b/src/util/list.h index b2ee3c7b62..74669a9081 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -169,8 +169,10 @@ template unsigned length(list const & l) { } /** \brief Return a list containing the elements in the subrange [begin, end). */ -template list::value_type> to_list(It const & begin, It const & end) { - list::value_type> r; +template list::value_type> +to_list(It const & begin, It const & end, + list::value_type> const & ls = list::value_type>()) { + list::value_type> r = ls; auto it = end; while (it != begin) { --it;