std::unique_lock::owns_lock

bool owns_lock() const; (since C++11) Checks whether *this owns a locked mutex or not. Parameters (none). Return value true if *this has an associated mutex and has acquired ownership of it, false otherwise. Exceptions noexcept specification: noexcept See also operator bool tests whether the lock owns its associated mutex (public member function)

operator-(reverse_iterator)

template< class Iterator > typename reverse_iterator<Iterator>::difference_type operator-( const reverse_iterator<Iterator>& lhs, const reverse_iterator<Iterator>& rhs ); (until C++11) template< class Iterator1, class Iterator2 > auto operator-( const reverse_iterator<Iterator1>& lhs, const reverse_iterator<Iterator2>& rhs ) -> decltype(rhs.base() - lhs.base()); (since C++11) Returns t

std::fgetwc

Defined in header <cwchar> wint_t fgetwc( std::FILE* stream ); wint_t getwc( std::FILE* stream ); Reads the next wide character from the given input stream. getwc() may be implemented as a macro and may evaluate stream more than once. Parameters stream - to read the wide character from Return value The next wide character from the stream or WEOF if an error has occurred or the end of file has been reached. If an encoding error occurred, errno is set to E

std::cin

Defined in header <iostream> extern std::istream cin; (1) extern std::wistream wcin; (2) The global objects std::cin and std::wcin control input from a stream buffer of implementation-defined type (derived from std::streambuf), associated with the standard C input stream stdin. These objects are guaranteed to be constructed before the first constructor of a static object is called and they are guaranteed to outlive the last destructor of a static object, so that it is

std::timed_mutex::native_handle

native_handle_type native_handle(); (since C++11) (optional) Returns the underlying implementation-defined native handle object. Parameters (none). Return value Implementation-defined native handle object. Exceptions Implementation-defined. Example

alignof operator

Queries alignment requirements of a type. Syntax alignof( type-id ) Returns a value of type std::size_t. Explanation Returns the alignment, in bytes, required for any instance of the type indicated by type-id, which is either complete type, an array type, or a reference type. If the type is reference type, the operator returns the alignment of referenced type; if the type is array type, alignment requirement of the element type is returned. Keywords alignof. Notes See alignm

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::ratio_less_equal

Defined in header <ratio> template< class R1, class R2 > struct ratio_less_equal : std::integral_constant; If the ratio R1 is less than or equal to the ratio R2, provides the member constant value equal true. Otherwise, value is false. Helper variable template template< class R1, class R2 > constexpr bool ratio_less_equal_v = ratio_less_equal<R1, R2>::value; (since C++17) Inherited from std::integral_constant Member constants value [st

std::basic_streambuf::pubseekpos

pos_type pubseekpos( pos_type pos, ios_base::openmode which = ios_base::in | ios_base::out ); (1) protected: virtual pos_type seekpos( pos_type pos, ios_base::openmode which = ios_base::in | ios_base::out); (2) Sets the position indicator of the input and/or output sequence to an absolute position. 1) Calls seekpos(pos, which) of the most derived class. 2) The base class version of this function has no effect. The derived classes may

std::unordered_set::rehash

void rehash( size_type count ); (since C++11) Sets the number of buckets to count and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. If the new number of buckets makes load factor more than maximum load factor (count < size() / max_load_factor()), then the new number of buckets is at least size() / max_load_factor(). Parameters count - new number of buckets Return value (none). Complexity