std::geometric_distribution

Defined in header <random> template< class IntType = int > class geometric_distribution; (since C++11) Produces random non-negative integer values i, distributed according to discrete probability function: P(i|p) = p · (1 − p). i The value represents the number of yes/no trials (each succeeding with probability p) which are necessary to obtain a single success. std::geometric_distribution<>(p) is exactly equivalent to std::negative_binomial_distribution<

std::shared_mutex::lock

void lock(); (since C++17) Locks the mutex. If another thread has already locked the mutex, a call to lock will block execution until the lock is acquired. If lock is called by a thread that already owns the mutex in any mode (shared or exclusive), the behavior is undefined. Prior unlock() operation on the same mutex synchronizes-with (as defined in std::memory_order) this operation. Parameters (none). Return value (none). Exceptions Throws std::system_error when errors occur,

std::strncat

Defined in header <cstring> char *strncat( char *dest, const char *src, std::size_t count ); Appends a byte string pointed to by src to a byte string pointed to by dest. At most count characters are copied. The resulting byte string is null-terminated. The destination byte string must have enough space for the contents of both dest and src plus the terminating null character, except that the size of src is limited to count. The behavior is undefined if the strings overlap.

std::basic_string::resize

void resize( size_type count ); (1) void resize( size_type count, CharT ch ); (2) Resizes the string to contain count characters. If the current size is less than count, additional characters are appended. If the current size is greater than count, the string is reduced to its first count elements. The first version initializes new characters to CharT(), the second version initializes new characters to ch. Parameters count - new size of the string ch - character to i

std::literals::complex_literals::operators

Defined in header <complex> constexpr complex<double> operator""i(long double arg); constexpr complex<double> operator""i(unsigned long long arg); (1) (since C++14) constexpr complex<float> operator""if(long double arg); constexpr complex<float> operator""if(unsigned long long arg); (2) (since C++14) constexpr complex<long double> operator""il(long double arg); constexpr complex<long double> operator""il(unsigned long long arg); (3

std::basic_ofstream::basic_ofstream

basic_ofstream(); (1) explicit basic_ofstream( const char* filename, ios_base::openmode mode = ios_base::out ); (2) explicit basic_ofstream( const string& filename, ios_base::openmode mode = ios_base::out ); (3) (since C++11) basic_ofstream( basic_ofstream&& other ); (4) (since C++11) basic_ofstream( const basic_ofstream& rhs) = delete; (5) (since C++11) Constructs new file stream.

std::cos(std::valarray)

Defined in header <valarray> template< class T > valarray<T> cos( const valarray<T>& va ); For each element in va computes cosine of the value of the element. Parameters va - value array to apply the operation to Return value Value array containing cosines of the values in va. Notes Unqualified function (cos) is used to perform the computation. If such function is not available, std::cos is used due to argument dependent lookup. The fu

std::bitset::count

size_t count() const; Returns the number of bits that are set to true. Parameters (none). Return value number of bits that are set to true. Example #include <iostream> #include <bitset> int main() { std::bitset<8> b("00010010"); std::cout << "initial value: " << b << '\n'; // find the first unset bit size_t idx = 0; while (idx < b.size() && b.test(idx)) ++idx; // continue setting bits until half the

std::regex_replace

Defined in header <regex> template< class OutputIt, class BidirIt, class Traits, class CharT, class STraits, class SAlloc > OutputIt regex_replace( OutputIt out, BidirIt first, BidirIt last, const std::basic_regex<CharT,Traits>& re, const std::basic_string<CharT,STraits,SAlloc>& fmt, std::regex_constants::match_flag_type flags = std::re

std::memcmp

Defined in header <cstring> int memcmp( const void* lhs, const void* rhs, std::size_t count ); Reinterprets the objects pointed to by lhs and rhs as arrays of unsigned char and compares the first count characters of these arrays. The comparison is done lexicographically. The sign of the result is the sign of the difference between the values of the first pair of bytes (both interpreted as unsigned char) that differ in the objects being compared. Parameters lhs, rhs -