Needs the string literal operator templates [-Wgnu-string-literal-operator-template] and at least C++14 compliant compiler. Supported:
- GCC
- Clang
// Positional:
auto formatted = "your {1} go {0}"_f("here", "args");
//or
std::cout << "{0} is {2} better"_f("this", "actually", "much");
// Sequential: [to be supported soon, ~since is an easier version, but need to optimize~]
Syntax is checked at compile-time. Missed a brace? Won't compile. Trying to output an out-of-bounds argument? Won't compile with a nice (well... kinda, if you think the static_assert is nice, that is) error message. [In the next version]: Wrong format specifiers are also compile-time checked.