cppreference.com > C++ Lists > merge
merge
Syntax:
  #include <list>
  void merge( list &lst );
  void merge( list &lst, BinPred compfunction );

The function merge() merges the list with lst, producing a combined list that is ordered with respect to the < operator. If compfunction is specified, then it is used as the comparison function for the lists instead of <.

merge() runs in linear time.