std::btowc

Defined in header <cwchar> std::wint_t btowc( int c ); Widens a single-byte character c to its wide character equivalent. Most multibyte character encodings use single-byte codes to represent the characters from the ASCII character set. This function may be used to convert such characters to wchar_t. Parameters c - single-byte character to widen Return value WEOF if c is EOF. Wide character representation of c if (unsigned char)c is a valid single-byte charact

std::shared_ptr::get

T* get() const; (since C++11) Returns a pointer to the managed object or a null pointer if no object is being managed. Parameters (none). Return value A pointer to the managed object or null. Exceptions noexcept specification: noexcept Example #include <iostream> #include <memory> #include <string> typedef std::shared_ptr<int> IntPtr; void output(const std::string& msg, int* pInt) { std::cout << msg << *pInt << "\n";

std::begin(std::initializer_list)

template< class E > const E* begin( initializer_list<E> il ); (since C++11) (until C++14) template< class E > constexpr const E* begin( initializer_list<E> il ); (since C++14) The overload of std::begin for initializer_list returns a pointer to the first element of il. Parameters il - an initializer_list Return value il.begin(). Exceptions noexcept specification: noexcept Example #include <iostream> #include <initializer_l

std::make_error_condition(std::errc)

Defined in header <system_error> std::error_condition make_error_condition( std::errc e ); (since C++11) Creates an error condition for an errc value e. Sets the error code to int(e) and error category to std::generic_category. Parameters e - standard error code Return value Error condition for e. Exceptions noexcept specification: noexcept

FormattedInputFunction

Requirements A FormattedInputFunction is a stream input function that performs the following: Constructs an object of type basic_istream::sentry with automatic storage duration and with the noskipws argument set to false, which performs the following if eofbit or badbit are set on the input stream, sets the failbit as well, and if exceptions on failbit are enabled in this input stream's exception mask, throws ios_base::failure. flushes the tie()'d output stream, if applicable if ios_b

std::normal_distribution::normal_distribution

explicit normal_distribution( RealType mean = 0.0, RealType stddev = 1.0 ); (1) (since C++11) explicit normal_distribution( const param_type& params ); (2) (since C++11) Constructs a new distribution object. The first version uses mean and stddev as the distribution parameters, the second version uses params as the distribution parameters. Parameters mean - the μ distribution parameter (mean) stddev - the σ distribution parameter (standard deviation) params -

std::hash

template<class T> struct hash<shared_ptr<T>>; (since C++11) The template specialization of std::hash for std::shared_ptr<T> allows users to obtain hashes of objects of type std::shared_ptr<T>. For a given std::shared_ptr<T> p, this specialization ensures that std::hash<std::shared_ptr<T>>()(p) == std::hash<T*>()(p.get()). Example See also hash (C++11) hash function object (class template)

std::basic_string::reserve

void reserve( size_type new_cap = 0 ); Informs a std::basic_string object of a planned change in size, so that it can manage the storage allocation appropriately. If new_cap is greater than the current capacity(), new storage is allocated, and capacity() is made equal or greater than new_cap. If new_cap is less than the current capacity(), this is a non-binding shrink request. If new_cap is less than the current size(), this is a non-binding shrink-to-fit request equivalent to shri

std::basic_ifstream::is_open

bool is_open(); (until C++11) bool is_open() const; (since C++11) Checks if the file stream has an associated file. Effectively calls rdbuf()->is_open(). Parameters (none). Return value true if the file stream has an associated file, false otherwise. Example #include <string> #include <fstream> #include <iostream> //this file is called main.cpp bool file_exists(const std::string& str) { std::ifstream fs(str); return fs.is_open(); } int

std::piecewise_constant_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.