std::ios_base::getloc

std::locale getloc() const; Returns the current locale associated with the stream. Parameters (none). Return value the locale object associated with the stream. Example #include <iostream> #include <ctime> #include <iomanip> #include <codecvt> int main() { std::wbuffer_convert<std::codecvt_utf8<wchar_t>> conv(std::cout.rdbuf()); std::wostream out(&conv); out.imbue(std::locale(out.getloc(), new s

std::deque::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. Example The following code uses size to display the number of elements in a std::deque: #include <deque> #include <iostream> int main() { std::deque<int> nums {1, 3

std::unique_lock::unlock

void unlock(); (since C++11) Unlocks the associated mutex and releases ownership. std::system_error is thrown if there is no associated mutex or if the mutex is not locked. Parameters (none). Return value (none). Exceptions Any exceptions thrown by mutex()->unlock() If there is no associated mutex or the mutex is not locked, std::system_error with an error code of std::errc::operation_not_permitted Example See also lock locks the associated mutex (public memb

setjmp

Defined in header <csetjmp> #define setjmp(env) /* implementation-defined */ Saves the current execution context into a variable env of type std::jmp_buf. This variable can later be used to restore the current execution context by std::longjmp function. That is, when a call to std::longjmp function is made, the execution continues at the particular call site that constructed the std::jmp_buf variable passed to std::longjmp. In that case setjmp returns the value passed to st

std::isalpha

Defined in header <cctype> int isalpha( int ch ); Checks if the given character is an alphabetic character as classified by the currently installed C locale. In the default locale, the following characters are alphabetic: uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ lowercase letters abcdefghijklmnopqrstuvwxyz In locales other than "C", an alphabetic character is a character for which std::isupper() or std::islower() returns non-zero or any other character considered

reinterpret_cast conversion

Converts between types by reinterpreting the underlying bit pattern. Syntax reinterpret_cast < new_type > ( expression ) Returns a value of type new_type. Explanation Unlike static_cast, but like const_cast, the reinterpret_cast expression does not compile to any CPU instructions. It is purely a compiler directive which instructs the compiler to treat the sequence of bits (object representation) of expression as if it had the type new_type. Only the following conversions can

std::nested_exception::nested_ptr

std::exception_ptr nested_ptr() const; (since C++11) Returns a pointer to the stored exception, if any. Parameters (none). Return value (none). Exceptions noexcept specification: noexcept

std::discard_block_engine::base

const Engine& base() const; (since C++11) Returns the underlying engine. Parameters (none). Return value The underlying engine. Exceptions noexcept specification: noexcept

std::poisson_distribution::reset

void reset(); (since C++11) Resets the internal state of the distribution object. After a call to this function, the next call to operator() on the distribution object will not be dependent on previous calls to operator(). Parameters (none). Return value (none). Complexity Constant.

std::adjacent_difference

Defined in header <numeric> template< class InputIt, class OutputIt > OutputIt adjacent_difference( InputIt first, InputIt last, OutputIt d_first ); (1) template< class InputIt, class OutputIt, class BinaryOperation > OutputIt adjacent_difference( InputIt first, InputIt last, OutputIt d_first, BinaryOperation op ); (2) Computes the differences between the second and the first of each adjacent pa