|
|
template<detail::FixedString Str> |
| constexpr auto | fmt::literals::operator""_cf () -> CompiledFormatString< Str > |
|
template<typename T, typename... Tail> |
| constexpr auto | fmt::detail::first (const T &value, const Tail &...) -> const T & |
template<typename OutputIt, typename S, typename... T>
requires (IsCompiledString<S>::value) |
| auto | fmt::formatToN (OutputIt out, size_t n, const S &fmt, T &&... args) -> FormatToNResult< OutputIt > |
template<typename S, typename... T>
requires (IsCompiledString<S>::value) |
| constexpr auto | fmt::formattedSize (const S &fmt, T &&... args) -> size_t |
template<typename S, typename... T>
requires (IsCompiledString<S>::value) |
| auto | fmt::print (std::FILE *f, const S &fmt, T &&... args) -> void |
template<typename S, typename... T>
requires (IsCompiledString<S>::value) |
| auto | fmt::print (const S &fmt, T &&... args) -> void |
| template<detail::FixedString Str, auto... Args> |
| constexpr auto | fmt::staticFormat () |
Compile-time format string parsing.
Interface partition fmt:compile.
- Copyright
- Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors. All rights reserved. For the license information refer to format.hpp.
template<detail::FixedString Str, auto... Args>
| auto fmt::staticFormat |
( |
| ) |
|
|
constexprexport |
Formats Args with the compile-time format string Str, entirely at compile time.
Unlike the other functions here, which compile the format string and format the arguments at run time, this also requires the arguments to be constant expressions. The result is a fixed-size buffer usable in a constant expression.
- Template Parameters
-
| Str | the format string. |
| Args | the arguments, which must be structural types usable as non-type template parameters. |
- Returns
- a static_format_result holding the formatted, NUL-terminated text.
Example:
constexpr auto result = fmt::staticFormat<"{}", 42>();
const char* s = result.c_str(); // "42"