Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

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

Entries: 5788

C++

std::enable_if and std::enable_if_t — conditionally exposing a type

std::enable_if exposes a type only when a compile-time condition is true. The std::enable_if_t alias shortens the spelling; in an appropriate substitution context, it lets SFINAE remove candidates from overload resolution.

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

std::endian — byte order

std::endian from <bit> describes the byte order of scalar types in the execution environment. Compare native with little and big, while also handling the special cases.

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

std::endl — newline and stream-buffer flush

std::endl inserts a newline and calls flush() on an output stream. Unlike '\n', it explicitly requests buffer synchronization; use it when you need both operations.

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

std::equal_to — equality function object

std::equal_to from <functional> wraps operator ==. The typed T form returns bool, while std::equal_to<> deduces both argument types.

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

std::errc — portable error conditions

std::errc is a scoped enumeration from <system_error>. It distinguishes named error conditions, including invalid_argument and result_out_of_range. With std::from_chars, check both ec and ptr when the entire input must be consumed.

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

std::filesystem::perms — permission bitmask

std::filesystem::perms represents file permission bits. Combine flags with |, inspect them with &, and distinguish an empty permission set from unknown permissions.

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