if statement

Conditionally executes another statement. Used where code needs to be executed based on a run-time condition. Syntax attr(optional) if ( condition ) statement_true attr(optional) if ( condition ) statement_true else statement_false attr(C++11) - any number of attributes condition - one of expression which is contextually convertible to bool declaration of a single non-array variable with a brace-or-equals initializer. statement_true - any statement (often a

std::collate::hash

Defined in header <locale> public: long hash( const CharT* beg, const CharT* end ) const; (1) protected: virtual long do_hash( const CharT* beg, const CharT* end ) const; (2) 1) Public member function, calls the protected virtual member function do_hash of the most derived class. 2) Converts the character sequence [beg, end) to an integer value that is equal to the hash obtained for all strings that collate equivalent in this locale (compare() returns ​0​). For two

std::set::swap

void swap( set& other ); Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated. The Pred objects must be Swappable, and they are exchanged using unqualified call to non-member swap. If std::allocator_traits<allocator_type>::propagate_on_container_swap::value is true, then the allocators are exchanged using an unq

std::declare_no_pointers

Defined in header <memory> void declare_no_pointers( char *p, std::size_t n ); (since C++11) Informs the garbage collector or leak detector that the specified memory region (n bytes beginning at the byte pointed to by p) contains no traceable pointers. If any part of the region is within an allocated object, the entire region must be contained in the same object. Parameters p - pointer to the beginning of the range n - the number of bytes in the range Ret

std::multimap::erase

(1) void erase( iterator pos ); (until C++11) iterator erase( iterator pos ); (since C++17) iterator erase( const_iterator pos ); (since C++11) (2) void erase( iterator first, iterator last ); (until C++11) iterator erase( const_iterator first, const_iterator last ); (since C++11) size_type erase( const key_type& key ); (3) Removes specified elements from the container. 1) Removes the element at pos. 2) Removes the elements in the range [first; last),

std::list::end

iterator end(); const_iterator end() const; const_iterator cend() const; (since C++11) Returns an iterator to the element following the last element of the container. This element acts as a placeholder; attempting to access it results in undefined behavior. Parameters (none). Return value Iterator to the element following the last element. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. See also begin

std::is_copy_assignable

Defined in header <type_traits> template< class T > struct is_copy_assignable; (1) (since C++11) template< class T > struct is_trivially_copy_assignable; (2) (since C++11) template< class T > struct is_nothrow_copy_assignable; (3) (since C++11) 1) If T is not a referenceable type (i.e., possibly cv-qualified void or a function type with a cv-qualifier-seq or a ref-qualifier), provides a member constant value equal to false. Otherwise, provides

std::regex_match

Defined in header <regex> template< class BidirIt, class Alloc, class CharT, class Traits > bool regex_match( BidirIt first, BidirIt last, std::match_results<BidirIt,Alloc>& m, const std::basic_regex<CharT,Traits>& e, std::regex_constants::match_flag_type flags = std::regex_constants::match_default ); (1) (since C++11) template< class BidirIt, class

std::basic_fstream::basic_fstream

basic_fstream(); (1) explicit basic_fstream( const char* filename, ios_base::openmode mode = ios_base::in|ios_base::out ); (2) explicit basic_fstream( const string& filename, ios_base::openmode mode = ios_base::in|ios_base::out ); (3) (since C++11) basic_fstream( basic_fstream&& other ); (4) (since C++11) basic_fstream( const basic_fstream& rhs) = delete; (5) (since C++11) Constructs

std::unique_ptr::release

pointer release(); (since C++11) Releases the ownership of the managed object if any. get() returns nullptr after the call. Parameters (none). Return value Pointer to the managed object or nullptr if there was no managed object, i.e. the value which would be returned by get() before the call. Exceptions noexcept specification: noexcept Example #include <memory> #include <iostream> #include <cassert> struct Foo { Foo() { std::cout << "Foo\n";