operators (std::normal_distribution)

template< class ResultType > bool operator==( const normal_distribution<ResultType>& lhs, const normal_distribution<ResultType>& rhs ); (1) template< class ResultType > bool operator!=( const normal_distribution<ResultType>& lhs, const normal_distribution<ResultType>& rhs ); (2) Compares two distribution objects. Two distribution objects are equal when parameter values and internal state is the s

std::set::empty

bool empty() const; Checks if the container has no elements, i.e. whether begin() == end(). Parameters (none). Return value true if the container is empty, false otherwise. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Example The following code uses empty to check if a std::set<int> contains any elements: #include <set> #include <iostream> int main() { std::set<int> numbers; std:

std::ctype::ctype

Defined in header <locale> explicit ctype( std::size_t refs = 0 ); Creates a std::ctype facet and forwards the starting reference count refs to the base class constructor, locale::facet::facet(). Parameters refs - starting reference count

std::allocator_traits::select_on_container_copy_construction

Defined in header <memory> static Alloc select_on_container_copy_construction( const Alloc& a ); (since C++11) If possible, obtains the copy-constructed version of the allocator a, by calling a.select_on_container_copy_construction(). If the above is not possible (e.g. a does not have the member function select_on_container_copy_construction(), then returns a, unmodified. This function is called by the copy constructors of all standard library containers. It allows the

std::scoped_allocator_adaptor::outer_allocator

Defined in header <scoped_allocator> outer_allocator_type& outer_allocator(); (1) (since C++11) const outer_allocator_type& outer_allocator() const; (2) (since C++11) Obtains a reference to the outer allocator used to declare this class. 1) returns static_cast<OuterAlloc&>(*this). 2) returns static_cast<const OuterAlloc&>(*this). Parameters (none). Return value A reference to OuterAlloc. Exceptions 1-2) noexcept specification: n

std::queue::queue

(1) explicit queue( const Container& cont = Container() ); (until C++11) explicit queue( const Container& cont ); (since C++11) explicit queue( Container&& cont = Container() ); (2) (since C++11) queue( const queue& other ); (3) queue( queue&& other ); (4) (since C++11) template< class Alloc > explicit queue( const Alloc& alloc ); (5) (since C++11) template< class Alloc > queue( const Container& cont, const A

std::basic_fstream::open

void open( const char *filename, ios_base::openmode mode = ios_base::in|ios_base::out ); (1) void open( const std::string &filename, ios_base::openmode mode = ios_base::in|ios_base::out ); (2) (since C++11) Opens and associates the file with name filename with the file stream. Calls setstate(failbit) on failure. Calls clear() on success. (since C++11) 1) Effectively calls rdbuf()->open(filename, mode). (see std::bas

std::basic_istream::putback

basic_istream& putback( char_type ch ); Puts the character ch back to the input stream so the next extracted character will be ch. First clears eofbit, then behaves as UnformattedInputFunction. After constructing and checking the sentry object, if rdbuf() is not null, calls rdbuf()->sputbackc(ch), which calls rdbuf()->pbackfail(ch) if ch does not equal the most recently extracted character. If rdbuf() is null or if rdbuf->sputbackc(ch) returns Traits::eof(), calls setstate(

std::basic_ostream::flush

basic_ostream& flush(); Writes uncommitted changes to the underlying output sequence. If rdbuf() is a null pointer, does nothing. Otherwise, behaves as an UnformattedOutputFunction (since C++11). After constructing and checking the sentry object, calls rdbuf()->pubsync(). If the call returns -1, calls setstate(badbit). Parameters (none). Return value *this. Exceptions May throw std::ios_base::failure if exceptions()&badbit!=0. Example #include <thread> #in

std::ostrstream::str

char* str(); Returns the pointer to the beginning of the buffer, after freezing it. Effectively calls rdbuf()->str(). Notes After a call to str(), dynamic streams become frozen. A call to freeze(false) is required before exiting the scope in which this ostrstream object was created. otherwise the destructor will leak memory. Also, additional output to a frozen stream may be truncated once it reaches the end of the allocated buffer. Parameters (none). Return value Pointer to t