std::literals::chrono_literals::operator""ns

Defined in header <chrono> constexpr std::chrono::nanoseconds operator "" ns(unsigned long long nsec); (1) (since C++14) constexpr std::chrono::duration</*unspecified*/, std::nano> operator "" ns(long double nsec); (2) (since C++14) Forms a std::chrono::duration literal representing nanoseconds. 1) integer literal, returns exactly std::chrono::nanoseconds(nsec) 2) floating-point literal, returns a floating-point duration equivalent

std::literals::chrono_literals::operator&quot;&quot;ms

Defined in header <chrono> constexpr std::chrono::milliseconds operator "" ms(unsigned long long ms); (1) (since C++14) constexpr std::chrono::duration</*unspecified*/, std::milli> operator "" ms(long double ms); (2) (since C++14) Forms a std::chrono::duration literal representing milliseconds. 1) integer literal, returns exactly std::chrono::milliseconds(ms) 2) floating-point literal, returns a floating-point duration equivalent to

std::literals::chrono_literals::operator&quot;&quot;min

Defined in header <chrono> constexpr chrono::minutes operator "" min(unsigned long long mins); (1) (since C++14) constexpr chrono::duration</*unspecified*/, ratio<60,1>> operator "" min(long double mins); (2) (since C++14) Forms a std::chrono::duration literal representing minutes. 1) integer literal, returns exactly std::chrono::minutes(mins) 2) floating-point literal, returns a floating-point duration equivalent to std::chrono::m

std::literals::chrono_literals::operator&quot;&quot;h

Defined in header <chrono> constexpr chrono::hours operator "" h(unsigned long long hrs); (1) (since C++14) constexpr chrono::duration</*unspecified*/, std::ratio<3600,1>> operator "" h(long double hrs); (2) (since C++14) Forms a std::chrono::duration literal representing hours. 1) integer literal, returns exactly std::chrono::hours(hrs) 2) floating-point literal, returns a floating-point duration equivalent to std::chrono::hours

std::list::unique

void unique(); (1) template< class BinaryPredicate > void unique( BinaryPredicate p ); (2) Removes all consecutive duplicate elements from the container. Only the first element in each group of equal elements is left. The first version uses operator== to compare the elements, the second version uses the given binary predicate p. Parameters p - binary predicate which returns ​true if the elements should be treated as equal. The signature of the predicate function shou

std::list::swap

void swap( list& other ); Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. It is unspecified whether an iterator holding the past-the-end value in this container will refer to the this or the other container after the operation. If std::allocator_traits<allocator_type>::propagate_on_container_swap::value is true, then the allocators are exchanged u

std::list::splice

void splice( const_iterator pos, list& other ); (1) void splice( const_iterator pos, list&& other ); (1) (since C++11) void splice( const_iterator pos, list& other, const_iterator it ); (2) void splice( const_iterator pos, list&& other, const_iterator it ); (2) (since C++11) void splice( const_iterator pos, list& other, const_iterator first, const_iterator last); (3) void splice( const_iterator pos, list&& other,

std::list::sort

void sort(); (1) template< class Compare > void sort( Compare comp ); (2) Sorts the elements in ascending order. The order of equal elements is preserved. The first version uses operator< to compare the elements, the second version uses the given comparison function comp. Parameters comp - comparison function object (i.e. an object that satisfies the requirements of Compare) which returns ​true if the first argument is less than (i.e. is ordered before) the secon

std::list::size

size_type size() const; Returns the number of elements in the container, i.e. std::distance(begin(), end()). Parameters (none). Return value The number of elements in the container. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant or linear. (until C++11) Constant. (since C++11) Example The following code uses size to display the number of elements in a std::list: #include <list> #include <iostream>

std::list::reverse

void reverse(); Reverses the order of the elements in the container. No references or iterators become invalidated. Parameters (none). Return value (none). Example #include <iostream> #include <list> std::ostream& operator<<(std::ostream& ostr, const std::list<int>& list) { for (auto &i : list) { ostr << " " << i; } return ostr; } int main() { std::list<int> list = { 8,7,5,9,0,1,3,2,6,4 };