std::swap(std::basic_string)

template< class T, class Traits, class Alloc > void swap( basic_string<T, Traits, Alloc> &lhs, basic_string<T, Traits, Alloc> &rhs ); Specializes the std::swap algorithm for std::basic_string. Swaps the contents of lhs and rhs. Equivalent to lhs.swap(rhs). Parameters lhs, rhs - strings whose contents to swap Return value (none). Complexity Constant. Exceptions noexcept specification: noexcept(noexcept(lhs.swap(rhs))) (since C++17) Se

Boolean literals

Syntax true (1) false (2) Explanation The Boolean literals are the keywords true and false. They are prvalues of type bool. Notes See Integral conversions for implicit conversions from bool to other types and boolean conversions for the implicit conversions from other types to bool. Example #include <iostream> int main() { std::cout << std::boolalpha << true << '\n' << false << '\n' <<

cstdbool

This header was originally in the C standard library as <stdbool.h>. Compatibility header, in C defines true, false and bool which are keywords in C++. __bool_true_false_are_defined (C++11) C compatibility macro constant, expands to integer constant 1 (macro constant)

std::map::insert

std::pair<iterator,bool> insert( const value_type& value ); (1) template< class P > std::pair<iterator,bool> insert( P&& value ); (2) (since C++11) std::pair<iterator,bool> insert( value_type&& value ); (2) (since C++17) (3) iterator insert( iterator hint, const value_type& value ); (until C++11) iterator insert( const_iterator hint, const value_type& value ); (since C++11) template< class P > iterator inse

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

this pointer

Syntax this The keyword this is a prvalue expression whose value is the address of the object, on which the member function is being called. It can appear in the following contexts: 1) Within the body of any non-static member function, including member initializer list 2) within the declaration of a non-static member function anywhere after the (optional) cv-qualifier sequence, including dynamic exception specification(deprecated), noexcept specification(C++11), and the trailing r

std::subtract_with_carry_engine::subtract_with_carry_engine

explicit subtract_with_carry_engine( result_type value = default_seed ); (1) (since C++11) template< class Sseq > explicit subtract_with_carry_engine( Sseq& s ); (2) (since C++11) subtract_with_carry_engine( const subtract_with_carry_engine& ); (3) (since C++11) (implicitly declared) Constructs the pseudo-random number engine. The overload (2) only participate in overload resolution if Sseq qualifies as a SeedSequence. In particular, it is excluded from the se

std::isalnum(std::locale)

Defined in header <locale> template< class charT > bool isalnum( charT ch, const locale& loc ); Checks if the given character classified as an alphanumeric character by the given locale's std::ctype facet. Parameters ch - character loc - locale Return value Returns true if the character is classified as alphanumeric, false otherwise. Possible implementation template< class charT > bool isalnum( charT ch, const std::locale& loc ) {

std::declare_reachable

Defined in header <memory> void declare_reachable( void* p ); (since C++11) Declares the object referenced by the pointer p reachable. Reachable objects will not be deleted by the garbage collector or considered to be a leak by a leak detector even if all pointers to it are destroyed. An object may be declared reachable multiple times, in which case multiple calls to std::undeclare_reachable would be needed to remove this property. For example, a XOR linked list needs to de

std::packaged_task

Defined in header <future> template< class > class packaged_task; //not defined (1) (since C++11) template< class R, class ...Args > class packaged_task<R(Args...)>; (2) (since C++11) The class template std::packaged_task wraps any Callable target (function, lambda expression, bind expression, or another function object) so that it can be invoked asynchronously. Its return value or exception thrown is stored in a shared state which can be accessed t