
"{$user}" # a parameter
"{$count * 2}" # any C++ expression
"{$size;std::fixed;std::setprecision(1)}" # with formats
"{$n;std::setw(3);fill('0')}" # manipulator + member call
"{$ std::string{ \"br{}ace\" } }" # braces nest
- The expression is any C++ expression valid in the generated function — usually a parameter. Braces inside it nest; a
;or an unbalanced}can be written\;/\}. - Each format is a statement applied to the stream before the value:
width(…),precision(…),fill(…),setf(…),unsetf(…),flags(…),imbue(…), or anything starting with., is a member call —stream.precision(1);- anything else is a manipulator —
stream << std::setw(3); - Afterwards the stream's whole format is restored, so a format never leaks into the rest of the text.
Macros work in double-quoted and bar lines, not in single-quoted ones. Manipulators with arguments need $INCLUDE <iomanip>.
app.msg:2:4: error: unterminated macro, missing '}'
app.msg:2:4: error: empty macro expression

