cpp/thread/thread/id/formatter

The template specialization of std for the std class allows users to convert a thread identifier to its textual representation using formatting functions.

Format specification
The syntax of format specifications is:

and have the same meaning as in standard format specification. The default alignment is.

The formatted output matches the output of, adjusted as appropriate for the format specifiers.

Example
{{example
 * code=
 * 1) include
 * 2) include
 * 3) include

int main {   std::thread::id this_id = std::this_thread::get_id; std::thread::id null_id;

std::cout << std::format("current thread id: {}\n", this_id); std::cout << std::format("{:=^10}\n", null_id); } current thread id: 140046396632256
 * p=true
 * output=

0
}}