std::cerr

Defined in header <iostream> extern std::ostream cerr; (1) extern std::wostream wcerr; (2) The global objects std::cerr and std::wcerr control output to a stream buffer of implementation-defined type (derived from std::streambuf and std::wstreambuf, respectively), associated with the standard C error output stream stderr. These objects are guaranteed to be initialized during or before the first time an object of type std::ios_base::Init is constructed and are availabl

std::list::assign

void assign( size_type count, const T& value ); (1) template< class InputIt > void assign( InputIt first, InputIt last ); (2) void assign( std::initializer_list<T> ilist ); (3) (since C++11) Replaces the contents of the container. 1) Replaces the contents with count copies of value value 2) Replaces the contents with copies of those in the range [first, last). This overload has the same effect as overload (1) if InputIt is an integral type. (until C++11) T

std::basic_ios::rdstate

iostate rdstate() const; Returns the current stream error state. Parameters (none). Return value current stream error state. It is a bitmask type and can be a combination of the following constants: Constant Explanation goodbit no error badbit irrecoverable stream error failbit input/output operation failed (formatting or extraction error) eofbit associated input sequence has reached end-of-file Example #include <iostream> #include <sstream>

std::gamma_distribution::param

param_type param() const; (1) (since C++11) void param( const param_type& params ); (2) (since C++11) Manages the associated distribution parameter set. 1) Returns the associated parameter set. 2) Sets the associated parameter set to params. Parameters params - new contents of the associated parameter set Return value 1) The associated parameter set. 2) (none). Complexity Constant.

std::discrete_distribution::max

result_type max() const; (since C++11) Returns the maximum value potentially generated by the distribution. Parameters (none). Return value The maximum value potentially generated by the distribution. Complexity Constant. See also min returns the minimum potentially generated value (public member function)

std::atexit

Defined in header <cstdlib> extern "C" int atexit( void (*func)() ); extern "C++" int atexit( void (*func)() ); Registers the function pointed to by func to be called on normal program termination (via std::exit() or returning from the cpp/language/main function). The functions will be called during the destruction of the static objects, in reverse order: if A was registered before B, then the call to B is made before the call to A. Same applies to the ordering betw

std::shared_lock::unlock

void unlock(); (since C++14) Unlocks the associated mutex from shared mode. Effectively calls mutex()->unlock_shared(). 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_shared() If there is no associated mutex, std::system_error with an error code of std::errc::operation_not_permitted Example See also lock locks the associat

and

Usage alternative operators: as an alternative for && Example #include <iostream> int n; int main() { if(n > 0 and n < 5) { std::cout << "n is small and positive\n"; } }

operators (std::basic_string)

Defined in header <string> template <class CharT, class Traits, class Allocator> std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os, const std::basic_string<CharT, Traits, Allocator>& str); (1) template <class CharT, class Traits, class Allocator> std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is,

std::add_lvalue_reference

Defined in header <type_traits> template< class T > struct add_lvalue_reference; (1) (since C++11) template< class T > struct add_rvalue_reference; (2) (since C++11) Creates a lvalue or rvalue reference type of T. 1) If T is an object or function that isn't cv- or ref- qualified (since C++17), provides a member typedef type which is T&. If T is an rvalue reference to some type U, then type is U&. Otherwise, type is T. 2) If T is an object or func