list_sort.h

Back to Doubly-linked list

pastel/sys/list/

// Description: Sort a list

#ifndef PASTELSYS_LIST_SORT_H
#define PASTELSYS_LIST_SORT_H

#include "pastel/sys/list.h"

namespace Pastel
{

    //! Sort a list
    /*!
   Time complexity: 
   O(n log(n))
   where
   n = list.size().

   Exception safety: nothrow

   The elements are moved by splicing.
   */
    template <
        typename Settings,
        template <typename> class Customization,
        typename Less = LessThan>
    List<Settings, Customization>& sort(
        List<Settings, Customization>& list,
        Less less = LessThan());

}

#include "pastel/sys/list/list_sort.hpp"

#endif