Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C++

Knowledge base — C++

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 674

C++

std::future_status — the result of a timed wait

std::future_status is a scoped enumeration from <future>, returned by wait_for() and wait_until(). It distinguishes a ready result, an expired timeout, and deferred execution. The status itself neither retrieves the value nor tells you whether the computation completed without an exception.

Intermediate · C++23; repository compiler flag, production runtime not attested
C++

std::greater — a greater-than comparison object

std::greater from <functional> creates a callable object that compares operands using >. Learn the distinction between std::greater<T> and the transparent std::greater<>.

Basic · C++23; repository compiler flag, production runtime not attested
C++

std::hash — function object for hashing keys

std::hash<Key> maps a key to a std::size_t value and is the default hasher for unordered associative containers. Equal keys must have equal hashes, but equal hashes do not prove that the keys are equal.

Intermediate · C++23; repository compiler flag, production runtime not attested
C++

std::hex — hexadecimal integer output and input

std::hex selects base 16 for formatted integer output and input on a stream. The setting remains active until changed; it changes neither the numeric value nor the formatting of floating-point numbers.

Basic · C++23; repository compiler flag, production runtime not attested
C++

std::ifstream: input file stream

std::ifstream connects character input operations to a file and retains formatting, EOF, and error state.

Intermediate · C++23
C++

std::initializer_list — access to list elements

std::initializer_list<T> accepts brace-enclosed elements as a read-only sequence. Copying the list object neither copies its elements nor extends their lifetime.

Intermediate · C++23; repository compiler flag, production runtime not attested
C++

std::inserter — insertion through an output iterator

std::inserter creates an output iterator that calls the container's insert on each assignment. This lets an algorithm such as std::copy add elements at a chosen position instead of overwriting existing ones.

Intermediate · C++23; repository compiler flag, production runtime not attested
C++

std::integral — constraining integer types

std::integral from <concepts> checks at compile time whether a type is integral. It includes bool and character types, preserves its result under const and volatile qualification, but rejects references, enumerations, and floating-point types.

Intermediate · C++23; repository compiler flag, production runtime not attested
C++

std::integral_constant — a constant as a type

std::integral_constant<T, v> represents the constant v of type T as a type. The <type_traits> header also provides std::bool_constant, std::true_type and std::false_type for expressing Boolean results in metaprogramming.

Intermediate · C++23; repository compiler flag, production runtime not attested
C++

std::invalid_argument — invalid argument exception

std::invalid_argument from <stdexcept> reports an invalid argument. It carries a diagnostic message available through what() and belongs to the std::logic_error exception hierarchy.

Basic · C++23; repository compiler flag, production runtime not attested
C++

std::ios_base: formatting flags and precision

std::ios_base stores a stream's formatting state. Learn how the setf overloads differ, what precision means, and how to enable fixed and boolalpha safely while preserving settings for later restoration.

Intermediate · C++23; repository compiler flag, production runtime not attested