0.9.0
-
More efficient implementation of variadic formatting functions.
-
Writer::Formatnow has a variadic overload:Writer out; out.Format("Look, I'm {}!", "variadic"); -
For efficiency and consistency with other overloads, variadic overload of the
Formatfunction now returnsWriterinstead ofstd::string. Use thestrfunction to convert it tostd::string:std::string s = str(Format("Look, I'm {}!", "variadic")); -
Replaced formatter actions with output sinks:
NoAction->NullSink,Write->FileSink,ColorWriter->ANSITerminalSink. This improves naming consistency and shouldn't affect client code unless these classes are used directly which should be rarely needed. -
Added
ThrowSystemErrorfunction that formats a message and throwsSystemErrorcontaining the formatted message and system-specific error description. For example, the following codeFILE *f = fopen(filename, "r"); if (!f) ThrowSystemError(errno, "Failed to open file '{}'") << filename;will throw
SystemErrorexception with description"Failed to open file '<filename>': No such file or directory"if file doesn't exist. -
Support for AppVeyor continuous integration platform.
-
Formatnow throwsSystemErrorin case of I/O errors. -
Improve test infrastructure. Print functions are now tested by redirecting the output to a pipe.