std::clock

Defined in header <ctime> std::clock_t clock(); Returns the approximate processor time used by the process since the beginning of an implementation-defined era related to the program's execution. To convert result value to seconds divide it by CLOCKS_PER_SEC. Only the difference between two values returned by different calls to std::clock is meaningful, as the beginning of the std::clock era does not have to coincide with the start of the program. std::clock time may advanc

std::shared_future::wait_for

template< class Rep, class Period > std::future_status wait_for( const std::chrono::duration<Rep,Period>& timeout_duration ) const; (since C++11) Waits for the result to become available. Blocks until specified timeout_duration has elapsed or the result becomes available, whichever comes first. Returns value identifies the state of the result. A steady clock is used to measure the duration. This function may block for longer than timeout_duration due to scheduling or res

std::wstring_convert

Defined in header <locale> template< class Codecvt, class Elem = wchar_t, class Wide_alloc = std::allocator<Elem>, class Byte_alloc = std::allocator<char> > class wstring_convert; (since C++11) Class template std::wstring_convert performs conversions between byte string std::string and wide string std::basic_string<Elem>, using an individual code conversion facet Codecvt. std::wstring_convert assumes ownership of the con

std::ios_base::iostate

typedef /*implementation defined*/ iostate; static constexpr iostate goodbit = 0; static constexpr iostate badbit = /*implementation defined*/ static constexpr iostate failbit = /*implementation defined*/ static constexpr iostate eofbit = /*implementation defined*/ Specifies stream state flags. It is a BitmaskType, the following constants are defined: Constant Explanation goodbit no error badbit irrecoverable stream error failbit input/output operation failed

std::deque::insert

(1) iterator insert( iterator pos, const T& value ); (until C++11) iterator insert( const_iterator pos, const T& value ); (since C++11) iterator insert( const_iterator pos, T&& value ); (2) (since C++11) (3) void insert( iterator pos, size_type count, const T& value ); (until C++11) iterator insert( const_iterator pos, size_type count, const T& value ); (since C++11) (4) template< class InputIt > void insert( iterator pos, InputIt f

std::regex_replace

Defined in header <regex> template< class OutputIt, class BidirIt, class Traits, class CharT, class STraits, class SAlloc > OutputIt regex_replace( OutputIt out, BidirIt first, BidirIt last, const std::basic_regex<CharT,Traits>& re, const std::basic_string<CharT,STraits,SAlloc>& fmt, std::regex_constants::match_flag_type flags = std::re

std::bitset::count

size_t count() const; Returns the number of bits that are set to true. Parameters (none). Return value number of bits that are set to true. Example #include <iostream> #include <bitset> int main() { std::bitset<8> b("00010010"); std::cout << "initial value: " << b << '\n'; // find the first unset bit size_t idx = 0; while (idx < b.size() && b.test(idx)) ++idx; // continue setting bits until half the

std::cos(std::valarray)

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

std::basic_ofstream::basic_ofstream

basic_ofstream(); (1) explicit basic_ofstream( const char* filename, ios_base::openmode mode = ios_base::out ); (2) explicit basic_ofstream( const string& filename, ios_base::openmode mode = ios_base::out ); (3) (since C++11) basic_ofstream( basic_ofstream&& other ); (4) (since C++11) basic_ofstream( const basic_ofstream& rhs) = delete; (5) (since C++11) Constructs new file stream.

abstract class

Defines an abstract type which cannot be instantiated, but can be used as a base class. Syntax pure virtual function is a virtual function whose declarator has the following syntax: declarator virt-specifier(optional) = 0 Here the sequence = 0 is known as pure-specifier, and appears either immediately after the declarator or after the optional virt-specifier (override or final). pure-specifier cannot appear in a member function definition. struct Base { virtual int g(); virtual ~Base