std::begin: the start iterator of a container or array
std::begin provides one way to obtain a container’s first iterator or a pointer to the first element of a built-in array.
CKTIS / C++
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
std::begin provides one way to obtain a container’s first iterator or a pointer to the first element of a built-in array.
std::binary_search returns a boolean indicating whether an ordered range contains an element equivalent to a key.
std::bind_front creates a callable that stores a function and its leading arguments, appending later call arguments after them.
std::bit_cast<To>(from) creates a new object from the source object's bits. Both types must have equal size and be trivially copyable; this is neither a numeric conversion nor access to the source through an alias.
std::bitset<N> stores exactly N bits and provides bit operations, counting, and conversions without dynamic sizing.
std::boolalpha enables textual output and input of bool values on a particular stream. With the classic locale, the names are true and false. The setting remains active until changed.
std::cerr is the narrow output stream associated with stderr, initialized with unitbuf and tied to std::cout.
std::chars_format selects floating-point notation for std::to_chars and parsing rules for std::from_chars. It provides general, fixed, scientific, and hex formats; it does not set precision by itself.
std::chrono::duration<Rep, Period> represents a time interval as a count of ticks whose period is a constant fraction of a second.
std::chrono::duration_cast converts a duration to a specified std::chrono::duration type. If scaling requires integer division, the quotient is truncated toward zero after the count is converted to a common intermediate type. The function does not check for overflow.
std::chrono::steady_clock never moves backward as physical time advances and progresses at a steady rate.
std::chrono::system_clock represents system-wide real time and can map its time points to time_t.
std::chrono::time_point<Clock, Duration> stores an offset from a clock epoch and represents a point, not merely a length of time.
std::chrono::weekday represents a day of the week. Its c_encoding() method returns unsigned: for valid values, 0 means Sunday and 6 means Saturday. Check ok() before interpreting input values.
std::chrono::year_month_day stores year, month, and day fields. Constructing an object does not guarantee a valid date: ok() also checks month length and leap years.
std::cin is the standard input stream. Extraction with >> attempts to interpret input as the requested type, so the result of the operation must be checked.
std::clamp returns the lower bound, upper bound, or value itself so the result lies in an ordered interval.
std::clog is the global narrow output stream associated with C stderr, without a required unitbuf setting.
std::condition_variable blocks a thread while atomically unlocking a mutex and wakes it after notification, but the condition must always be checked again.
std::copy assigns every element of an input range to consecutive destination positions and returns the iterator past the last write.
std::copy_if tests every element, copies only those with a true predicate result, and returns the end of the written destination portion.
std::coroutine_handle is a copyable pointer-like reference to a coroutine frame and does not manage that frame’s lifetime by itself.
std::count traverses an entire range, compares each element with a value, and returns the hit count in the iterator’s difference_type.
std::count_if tests every element in a range with a predicate and returns the number of true results.