what "..."_f is: a format string whose literal is part of its type - so it is widened (if narrow) at compile time, and checked against the arguments of each call at compile time, as std::format checks its format string More...
#include <Format.h>
Public Member Functions | |
| template<Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA(IFormattable)... ARGS> | |
| String | operator() (ARGS &&... args) const |
| template<Stroika_Foundation_Common_formattable_FilterOnStringLitOp_BWA(IFormattable)... ARGS> | |
| String | operator() (const locale &loc, ARGS &&... args) const |
| As FormatString's, but checked at compile time. | |
| operator FormatString< char > () const | |
Public Member Functions inherited from Stroika::Foundation::Characters::FormatString< wchar_t > | |
| constexpr wstring_view | get () const |
| constexpr qStroika_Foundation_Characters_FMT_PREFIX_::wstring_view | getx_ () const |
| the format string as the formatting library's own wstring_view (std's, or fmtlib's) - only for calling Common::StdCompat::vformat directly | |
| String | operator() (ARGS &&... args) const |
| format args - checked against the format string at run time: a mismatch throws format_error (a FormatLiteral, "..."_f, checks at compile time) | |
| String | operator() (const locale &loc, ARGS &&... args) const |
| As above, with a locale. | |
what "..."_f is: a format string whose literal is part of its type - so it is widened (if narrow) at compile time, and checked against the arguments of each call at compile time, as std::format checks its format string
It is a FormatString<wchar_t>, so anything taking a FormatString takes one - but only what takes a FormatLiteral checks the arguments: its operator (), Format, DbgTrace, TraceContextBumper, Logger::Log and WebServer::Response::write.
Definition at line 205 of file Characters/Format.h.
| String Stroika::Foundation::Characters::FormatLiteral< LITERAL >::operator() | ( | ARGS &&... | args | ) | const |
As FormatString's operator (), but args are checked against the format string at compile time
Definition at line 197 of file Characters/Format.inl.
| Stroika::Foundation::Characters::FormatLiteral< LITERAL >::operator FormatString< char > | ( | ) | const |
For code that names FormatString<char>, as a narrow "..."_f was before Stroika v3.0d25: this one copies the literal
Definition at line 243 of file Characters/Format.inl.