From e408b9fe771bb480b620c30f5e2de4f6c3b15669 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 18 Jan 2019 18:28:12 +0000 Subject: Add missing doxygen comments --- libadhocutil/compileTimeFormatter.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libadhocutil/compileTimeFormatter.h b/libadhocutil/compileTimeFormatter.h index 6a932be..562c511 100644 --- a/libadhocutil/compileTimeFormatter.h +++ b/libadhocutil/compileTimeFormatter.h @@ -137,6 +137,11 @@ namespace AdHoc { std::basic_stringstream s; return write(s, pn...).str(); } + /** + * Get a string containing the result of formatting. + * @param pn the format arguments. + * @return the formatted string. + */ template inline auto operator()(const Pn & ... pn) const { @@ -154,6 +159,12 @@ namespace AdHoc { { return Parser::run(s, pn...); } + /** + * Write the result of formatting to the given stream. + * @param s the stream to write to. + * @param pn the format arguments. + * @return the stream. + */ template inline stream & operator()(stream & s, const Pn & ... pn) const { @@ -195,8 +206,10 @@ namespace AdHoc { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wgnu-string-literal-operator-template" #endif + /// CTF format string holder template struct FMT { + /// CTF format string static constexpr char __FMT[] = {t...}; }; template inline auto operator""_fmt() noexcept -- cgit v1.2.3