.. Generated automatically by cpp2rst .. highlight:: c .. role:: red .. role:: green .. role:: param .. _itertools__bubble_sort: itertools::bubble_sort ====================== *#include * **Synopsis** .. rst-class:: cppsynopsis 1. | :green:`template` | std::size_t :red:`bubble_sort` (ForwardIt :param:`first`, ForwardIt :param:`last`, Compare :param:`comp` = {}) 2. | :green:`template` | std::size_t :red:`bubble_sort` (Range && :param:`rng`, Compare :param:`comp` = {}) Documentation Template parameters ^^^^^^^^^^^^^^^^^^^ * :param:`ForwardIt` Forward iterator type. * :param:`Compare` Comparison function type. * :param:`Range` Forward range type. Parameters ^^^^^^^^^^ * :param:`first` Forward iterator to the first element of the range. * :param:`last` Forward iterator to the element after the last of the range. * :param:`comp` Comparison function callable with two dereferenced iterators. * :param:`rng` A forward range to sort. Returns ^^^^^^^ Number of swaps necessary to sort the range.