dynamic_cast conversion

Safely converts pointers and references to classes up, down, and sideways along the inheritance hierarchy. Syntax dynamic_cast < new_type > ( expression ) new_type - pointer to complete class type, reference to complete class type, or pointer to (optionally cv-qualified) void expression - lvalue of a complete class type if new_type is a reference, prvalue of a pointer to complete class type if new_type is a pointer. If the cast is successful, dynamic_cast returns

std::tanh(std::valarray)

Defined in header <valarray> template< class T > valarray<T> tanh( const valarray<T>& va ); For each element in va computes hyperbolic tangent of the value of the element. Parameters va - value array to apply the operation to Return value Value array containing hyperbolic tangent of the values in va. Notes Unqualified function (tanh) is used to perform the computation. If such function is not available, std::tanh is used due to argumen

std::c32rtomb

Defined in header <cuchar> std::size_t c32rtomb( char* s, char32_t c32, std::mbstate_t* ps ); (since C++11) Converts a UTF-32 character to its narrow multibyte representation. If s is not a null pointer, the function determines the number of bytes necessary to store the multibyte character representation of c32 (including any shift sequences), and stores the multibyte character representation in the character array whose first element is pointed to by s. At most MB_CUR_MAX

std::basic_string::compare

int compare( const basic_string& str ) const; (1) int compare( size_type pos1, size_type count1, const basic_string& str ) const; (2) (3) int compare( size_type pos1, size_type count1, const basic_string& str, size_type pos2, size_type count2 ) const; (until C++14) int compare( size_type pos1, size_type count1, const basic_string& str, size_type pos2, size_type count2 = npos ) const; (since C

std::numeric_limits::signaling_NaN

static T signaling_NaN(); (until C++11) static constexpr T signaling_NaN(); (since C++11) Returns the special value "signaling not-a-number", as represented by the floating-point type T. Only meaningful if std::numeric_limits<T>::has_signaling_NaN == true. In IEEE 754, the most common binary representation of floating-point numbers, any value with all bits of the exponent set and at least one bit of the fraction set represents a NaN. It is implementation-defined which values

operators (std::sub_match)

Defined in header <regex> Direct comparison template< class BidirIt > bool operator==( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs ); (1) (since C++11) template< class BidirIt > bool operator!=( const sub_match<BidirIt>& lhs, const sub_match<BidirIt>& rhs ); (2) (since C++11) template< class BidirIt > bool operator<( const sub_match<BidirIt>&

std::chrono::time_point::time_since_epoch

duration time_since_epoch() const; (since C++11) (until C++14) constexpr duration time_since_epoch() const; (since C++14) Returns a duration representing the amount of time between *this and the clock's epoch. Parameters (none). Return value The amount of time between this time_point and the clock's epoch. Example #include <iostream> #include <chrono> #include <ctime> int main() { std::chrono::time_point<std::chrono::system_clock> p1, p2, p

std::memset

Defined in header <cstring> void* memset( void* dest, int ch, std::size_t count ); Converts the value ch to unsigned char and copies it into each of the first count characters of the object pointed to by dest. If the object is not trivially-copyable (e.g., scalar, array, or a C-compatible struct), the behavior is undefined. If count is greater than the size of the object pointed to by dest, the behavior is undefined. Parameters dest - pointer to the object to fill

std::deque::emplace_front

template< class... Args > void emplace_front( Args&&... args ); (since C++11) Inserts a new element to the beginning of the container. The element is constructed through std::allocator_traits::construct, which typically uses placement-new to construct the element in-place at the location provided by the container. The arguments args... are forwarded to the constructor as std::forward<Args>(args).... Parameters args - arguments to forward to the constructor of

std::to_string

Defined in header <string> std::string to_string( int value ); (1) (since C++11) std::string to_string( long value ); (2) (since C++11) std::string to_string( long long value ); (3) (since C++11) std::string to_string( unsigned value ); (4) (since C++11) std::string to_string( unsigned long value ); (5) (since C++11) std::string to_string( unsigned long long value ); (6) (since C++11) std::string to_string( float value ); (7) (since C++11)