Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
std::formatter< test_priority > Struct Reference

Specialization of std::formatter for test_priority. Enables formatting of test_priority enum values as strings using C++20 std::format. More...

#include <test_type.h>

Inheritance diagram for std::formatter< test_priority >:
Inheritance graph
Collaboration diagram for std::formatter< test_priority >:
Collaboration graph

Public Member Functions

template<typename FormatContext >
auto format (const test_priority &priority, FormatContext &ctx) const
 Formats a test_priority value as a string.
 

Detailed Description

Specialization of std::formatter for test_priority. Enables formatting of test_priority enum values as strings using C++20 std::format.

Definition at line 75 of file test_type.h.

Member Function Documentation

◆ format()

template<typename FormatContext >
auto std::formatter< test_priority >::format ( const test_priority & priority,
FormatContext & ctx ) const
inline

Formats a test_priority value as a string.

Template Parameters
FormatContextType of the format context.
Parameters
priorityThe test_priority enum value to format.
ctxFormat context for the output.
Returns
Iterator to the end of the formatted output.

Definition at line 85 of file test_type.h.

86 {
87 return std::formatter<std::string_view>::format(to_string(priority), ctx);
88 }
constexpr std::string_view to_string(test_priority priority)
Converts a test_priority value to its string representation.
Definition test_type.h:51

References to_string().

Here is the call graph for this function:

The documentation for this struct was generated from the following file: