2015-03-05 02:10:08 +00:00
|
|
|
0.9.0 - 2014-05-13
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* More efficient implementation of variadic formatting functions.
|
|
|
|
|
2015-03-05 02:16:26 +00:00
|
|
|
* ``Writer::Format`` now has a variadic overload:
|
|
|
|
|
|
|
|
.. code:: c++
|
2015-03-05 02:10:08 +00:00
|
|
|
|
|
|
|
Writer out;
|
|
|
|
out.Format("Look, I'm {}!", "variadic");
|
|
|
|
|
|
|
|
* For efficiency and consistency with other overloads, variadic overload of
|
2015-03-05 02:16:26 +00:00
|
|
|
the ``Format`` function now returns ``Writer`` instead of ``std::string``.
|
|
|
|
Use the ``str`` function to convert it to ``std::string``:
|
|
|
|
|
|
|
|
.. code:: c++
|
2015-03-05 02:10:08 +00:00
|
|
|
|
|
|
|
std::string s = str(Format("Look, I'm {}!", "variadic"));
|
|
|
|
|
2015-03-05 02:16:26 +00:00
|
|
|
* 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 ``ThrowSystemError`` function that formats a message and throws
|
|
|
|
``SystemError`` containing the formatted message and system-specific error
|
|
|
|
description. For example, the following code
|
2015-03-05 02:10:08 +00:00
|
|
|
|
2015-03-05 02:16:26 +00:00
|
|
|
.. code:: c++
|
2015-03-05 02:10:08 +00:00
|
|
|
|
|
|
|
FILE *f = fopen(filename, "r");
|
|
|
|
if (!f)
|
|
|
|
ThrowSystemError(errno, "Failed to open file '{}'") << filename;
|
|
|
|
|
2015-03-05 02:16:26 +00:00
|
|
|
will throw ``SystemError`` exception with description
|
2015-03-05 02:10:08 +00:00
|
|
|
"Failed to open file '<filename>': No such file or directory" if file
|
|
|
|
doesn't exist.
|
|
|
|
|
|
|
|
* Support for `AppVeyor <https://ci.appveyor.com/project/vitaut/cppformat>`_
|
|
|
|
continuous integration platform.
|
|
|
|
|
2015-03-05 02:16:26 +00:00
|
|
|
* ``Format`` now throws ``SystemError`` in case of I/O errors.
|
2015-03-05 02:10:08 +00:00
|
|
|
|
|
|
|
* Improve test infrastructure. Print functions are now tested by redirecting
|
|
|
|
the output to a pipe.
|
|
|
|
|
|
|
|
0.8.0 - 2014-04-14
|
|
|
|
------------------
|
|
|
|
|
|
|
|
* Initial release
|