std::function::target_type

const std::type_info& target_type() const; (since C++11) Returns the type of the stored function. Parameters (none). Return value typeid(T) if the stored function has type T, otherwise typeid(void). Exceptions noexcept specification: noexcept Example #include <functional> #include <iostream> int f(int a) { return -a; } int main() { // fn1 and fn2 have the same type, but their targets do not std::function<int(int)> fn1(f),

std::literals::chrono_literals::operator&quot;&quot;s

Defined in header <chrono> constexpr chrono::seconds operator "" s(unsigned long long secs); (1) (since C++14) constexpr chrono::duration</*unspecified*/> operator "" s(long double secs); (2) (since C++14) Forms a std::chrono::duration literal representing seconds. 1) integer literal, returns exactly std::chrono::seconds(secs) 2) floating-point literal, returns a floating-point duration equivalent to std::chrono::seconds Parameters secs - the number

std::raw_storage_iterator

Defined in header <memory> template< class OutputIt, class T > class raw_storage_iterator : public std::iterator<std::output_iterator_tag, void, void, void, void>; (until C++17) template< class OutputIt, class T > class raw_storage_iterator; (since C++17) The output iterator std::raw_storage_iterator makes it possible for standard algorithms to store results in uninitialized memory. Whenever the algorithm writes an object of type T to the derefer

nullptr

Syntax nullptr (since C++11) Explanation The keyword nullptr denotes the pointer literal. It is a prvalue of type std::nullptr_t. There exist implicit conversions from nullptr to null pointer value of any pointer type and any pointer to member type. Similar conversions exist for any null pointer constant, which includes values of type std::nullptr_t as well as the macro NULL. Example Demonstrates how nullptr allows forwarding via a template function. #include <cstddef> #

std::ctype&lt;char&gt;

Defined in header <locale> template<> class ctype<char>; This specialization of std::ctype encapsulates character classification features for type char. Unlike general-purpose std::ctype, which uses virtual functions, this specialization uses table lookup to classify characters (which is generally faster). The base class std::ctype<char> implements character classification equivalent to the minimal "C" locale. The classification rules can be extended or mo

std::rewind

Defined in header <cstdio> void rewind( std::FILE* stream ); Moves the file position indicator to the beginning of the given file stream. The function is equivalent to std::fseek(stream, 0, SEEK_SET);, except that end-of-file and error indicators are cleared. The function drops any effects from previous calls to ungetc. Parameters stream - file stream to modify Return value (none). Example #include <cstdio> int main() { std::FILE *f; char

cstdlib

This header was originally in the C standard library as <stdlib.h>. This header provides miscellaneous utilities. Symbols defined here are used by several library components. Macro constants EXIT_SUCCESSEXIT_FAILURE indicates program execution execution status (macro constant) MB_CUR_MAX maximum number of bytes in a multibyte character with the current locale (macro constant) NULL implementation-defined null pointer constant (macro constant) RAND_MAX maximum possible

operators (std::move_iterator)

template< class Iterator1, class Iterator2 > bool operator==( const move_iterator<Iterator1>& lhs, const move_iterator<Iterator2>& rhs ); (1) template< class Iterator1, class Iterator2 > bool operator!=( const move_iterator<Iterator1>& lhs, const move_iterator<Iterator2>& rhs ); (2) template< class Iterator1, class Iterator2 > bool operator<( const move_iterator<Iterator1>& lhs,

if

Usage if statement: as the declaration of the if statement

std::current_exception

Defined in header <exception> std::exception_ptr current_exception(); (since C++11) If called during exception handling (typically, in a catch clause), captures the current exception object and creates an std::exception_ptr that holds either a copy or a reference to that exception object (it is implementation-defined if a copy is made). If the implementation of this function requires a call to new and the call fails, the returned pointer will hold a reference to an instance