template< class T >
constexpr bool enable_nonlocking_formatter_optimization = false;
This template can be used by implementations to enable efficient implementations of std::print and std::println.
If std::enable_nonlocking_formatter_optimization<T>
is true, printing an argument of type T
can be performed in a more efficient way (see std::print for details). std::enable_nonlocking_formatter_optimization
specializations can be true in the following cases:
T
is one of the types where std::formatter<T, CharT> is a basic standard specialization or standard specialization for a library type (see below).T
. Such specializations must be usable in constant expressions and have type const bool.In the following list, CharT
is either char or wchar_t, ArithmeticT
is any cv-unqualified arithmetic type other than char, wchar_t, char8_t, char16_t, or char32_t:
Nonlocking flag for character formatters
template<>
constexpr bool enable_nonlocking_formatter_optimization<CharT> = true;
Nonlocking flag for string formatters
template<>
constexpr bool enable_nonlocking_formatter_optimization<CharT*> = true;
template<>
constexpr bool enable_nonlocking_formatter_optimization<const CharT*> = true;
constexpr bool enable_nonlocking_formatter_optimization
constexpr bool enable_nonlocking_formatter_optimization
Nonlocking flag for arithmetic formatters
template<>
constexpr bool enable_nonlocking_formatter_optimization<ArithmeticT> = true;
Nonlocking flag for pointer formatters
template<>template<>
constexpr bool enable_nonlocking_formatter_optimization<void*> = true;
template<>
constexpr bool enable_nonlocking_formatter_optimization<const void*> = true;
Specializations of enable_nonlocking_formatter_optimization
for all specializations of the following standard templates are defined as true:
TimeZonePtr
is const std::chrono::time_zone*Specializations of enable_nonlocking_formatter_optimization
for all specializations of the following standard templates are defined as conditionally true:
Specialization of enable_nonlocking_formatter_optimization
for all formattable range types are always defined as false for which the range format kind is not std::range_format::disabled.
__cpp_lib_print
202403L
(C++26)
202406L
(C++26)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4