clones the specified list and replace its contents
None
Both arguments are lists. The first argument is used as a prototype which supplies the methods for the newly created list. Any list items of the prototype list are discarded. Instead all list items of the second argument are used as the contents of the newly created list.
std::new | creates a new collection with inherited attributes |
std::list | constructs a list from its arguments |