std::piecewise_constant_distribution::piecewise_constant_distribution

piecewise_constant_distribution(); (1) (since C++11) template< class InputIt1, class InputIt2 > piecewise_constant_distribution( InputIt1 first_i, InputIt1 last_i, InputIt2 first_w ); (2) (since C++11) template< class UnaryOperation > piecewise_constant_distribution( std::initializer_list<RealType> bl, UnaryOperation fw ); (3) (since C++11) template< class UnaryOperation > piecewise_con

std::partition_point

Defined in header <algorithm> template< class ForwardIt, class UnaryPredicate > ForwardIt partition_point( ForwardIt first, ForwardIt last, UnaryPredicate p ); (1) (since C++11) Examines the partitioned (as if by std::partition) range [first, last) and locates the end of the first partition, that is, the first element that does not satisfy p or last if all elements satisfy p. Parameters first, last - the partitioned range of elements to examine p - unary

std::partial_sum

Defined in header <numeric> template< class InputIt, class OutputIt > OutputIt partial_sum( InputIt first, InputIt last, OutputIt d_first ); (1) template< class InputIt, class OutputIt, class BinaryOperation > OutputIt partial_sum( InputIt first, InputIt last, OutputIt d_first, BinaryOperation op ); (2) Computes the partial sums of the elements in the subranges of the range [first, last) and writes them to the range beginning at d_fir

std::partial_sort_copy

Defined in header <algorithm> template< class InputIt, class RandomIt > RandomIt partial_sort_copy( InputIt first, InputIt last, RandomIt d_first, RandomIt d_last ); (1) template< class InputIt, class RandomIt, class Compare > RandomIt partial_sort_copy( InputIt first, InputIt last, RandomIt d_first, RandomIt d_last, Compare comp ); (2) Sorts some of the elements in the ran

std::partition_copy

Defined in header <algorithm> template< class InputIt, class OutputIt1, class OutputIt2, class UnaryPredicate > std::pair<OutputIt1, OutputIt2> partition_copy( InputIt first, InputIt last, OutputIt1 d_first_true, OutputIt2 d_first_false, UnaryPredicate p ); (since C++11) Copies the elements from the range [first, last) to two different ranges depending on the value returned by the predicate p. The elements

std::partition

Defined in header <algorithm> template< class BidirIt, class UnaryPredicate > BidirIt partition( BidirIt first, BidirIt last, UnaryPredicate p ); (until C++11) template< class ForwardIt, class UnaryPredicate > ForwardIt partition( ForwardIt first, ForwardIt last, UnaryPredicate p ); (since C++11) Reorders the elements in the range [first, last) in such a way that all elements for which the predicate p returns true precede the elements for which predicate p

std::pair

Defined in header <utility> template< class T1, class T2 > struct pair; std::pair is a struct template that provides a way to store two heterogeneous objects as a single unit. A pair is a specific case of a std::tuple with two elements. Template parameters T1, T2 - the types of the elements that the pair stores. Member types Member type Definition first_type T1 second_type T2 Member objects Member name Type first T1 seco

std::pair::pair

(1) pair(); (until C++11) constexpr pair(); (since C++11) pair( const T1& x, const T2& y ); (2) (until C++14) constexpr pair( const T1& x, const T2& y ); (2) (since C++14) template< class U1, class U2 > pair( U1&& x, U2&& y ); (3) (since C++11) (until C++14) template< class U1, class U2 > constexpr pair( U1&& x, U2&& y ); (3) (since C++14) template< class U1, class U2 > pair( const pair<U1,

std::partial_sort

Defined in header <algorithm> template< class RandomIt > void partial_sort( RandomIt first, RandomIt middle, RandomIt last ); (1) template< class RandomIt, class Compare > void partial_sort( RandomIt first, RandomIt middle, RandomIt last, Compare comp ); (2) Rearranges elements such that the range [first, middle) contains the sorted middle - first smallest elements in the range [first, last). The order of equal elements is not guaranteed to be preserved. T

std::pair::swap

void swap(pair& other); (since C++11) Swaps first with other.first and second with other.second. Parameters other - pair of values to swap Return value (none). Exceptions noexcept specification: noexcept(noexcept(std::swap(first, other.first)) &&noexcept(std::swap(second, other.second)). ) Example #include <iostream> #include <utility> #include <string> int main() { std::pair<int, std::string> p1, p2; p1 = std::make_pai